diff options
author | Samuel Just <sam.just@inktank.com> | 2013-09-20 11:26:49 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-10-01 12:36:30 -0700 |
commit | bf96569394aed88d9f441493b0d64727168a9899 (patch) | |
tree | ed15fad6223b555fe0229dcdf885313a338d9cb1 | |
parent | 85699ae3305c7c05c4e4c1b1dc9be5ec1ac4de28 (diff) | |
download | ceph-bf96569394aed88d9f441493b0d64727168a9899.tar.gz |
ReplicatedPG: add debugging in recover_replicas for objects added for backfill
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r-- | src/osd/ReplicatedPG.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index def60ce0dbf..2b541f21a1e 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -7889,6 +7889,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; @@ -7902,6 +7904,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; |