summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-09-20 11:26:49 -0700
committerSamuel Just <sam.just@inktank.com>2013-09-23 22:55:57 -0700
commit6fbb42c44e4b6eb26a2990c8129f22678d47d5f6 (patch)
treec9af5962fd1cd0e6899de55d016ef36c28a72a50
parentb8c56800de45929de485c7e86f303cadf31f4d48 (diff)
downloadceph-wip-5992-2.tar.gz
ReplicatedPG: add debugging in recover_replicas for objects added for backfillwip-5992-2
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/osd/ReplicatedPG.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index 68f7d5e59a4..c89d2314e4d 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -7872,6 +7872,8 @@ int ReplicatedPG::recover_replicas(int max, ThreadPool::TPHandle &handle)
int peer = acting[i];
map<int, pg_missing_t>::const_iterator pm = peer_missing.find(peer);
assert(pm != peer_missing.end());
+ map<int, pg_info_t>::const_iterator pi = peer_info.find(peer);
+ assert(pi != peer_info.end());
size_t m_sz = pm->second.num_missing();
dout(10) << " peer osd." << peer << " missing " << m_sz << " objects." << dendl;
@@ -7885,6 +7887,15 @@ int ReplicatedPG::recover_replicas(int max, ThreadPool::TPHandle &handle)
handle.reset_tp_timeout();
const hobject_t soid(p->second);
+ if (soid > pi->second.last_backfill) {
+ if (!recovering.count(soid)) {
+ derr << __func__ << ": object added to missing set for backfill, but "
+ << "is not in recovering, error!" << dendl;
+ assert(0);
+ }
+ continue;
+ }
+
if (recovering.count(soid)) {
dout(10) << __func__ << ": already recovering" << soid << dendl;
continue;