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-10-04 13:50:09 -0700
commit0c1e251351ca030cc9e8eaa753e3a70890c8b3a0 (patch)
treef8c2ca4aa89f779c65c90e20eedb2c5007a1f9c4
parent2ae9ece1a88d6e428fb76d31b64aa5ec3f23c9e8 (diff)
downloadceph-0c1e251351ca030cc9e8eaa753e3a70890c8b3a0.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.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index 9c0b6b3d30b..2627d74738c 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -7890,6 +7890,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;
@@ -7903,6 +7905,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;