diff options
author | Sage Weil <sage.weil@dreamhost.com> | 2011-05-20 09:14:24 +0200 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2011-05-20 09:14:24 +0200 |
commit | 4c97cb5f347a8b8529cd1aad680cea705682e35a (patch) | |
tree | ac188ae1b82e3b8319e40c5dea5fb162fd68859c | |
parent | osd: remove some build_prior stringstream cruft (diff) | |
download | ceph-4c97cb5f347a8b8529cd1aad680cea705682e35a.tar.xz ceph-4c97cb5f347a8b8529cd1aad680cea705682e35a.zip |
osd: fix compensation for bad last_complete
If the peer has a last_complete below their tail, we can get by with our
log (without backlog) if our tail if _before_ their last_complete, not
after. Otherwise, we need a backlog!
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
-rw-r--r-- | src/osd/PG.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 9f020fd5a2e..aa496c3cef9 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1602,7 +1602,7 @@ void PG::activate(ObjectStore::Transaction& t, list<Context*>& tfin, // the replica's tail is after it's last_complete and it has no backlog. // ick, this shouldn't normally happen. but we can compensate! dout(10) << "activate peer osd" << peer << " has last_complete < log tail and no backlog, compensating" << dendl; - if (log.tail >= pi.last_complete) { + if (log.tail <= pi.last_complete) { // _our_ log is sufficient, phew! m->log.copy_after(log, pi.last_complete); } else { |