From 3c91cb5a48368266c06b3f84bf83a5b7c0b1519a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 9 Jun 2009 12:08:05 -0700 Subject: [PATCH] osd: replica should not check missing map on push That is, we should let the primary push us objects even if we don't think they're missing. This is necessary for pg repair to work. The old check is useless, since we already restart peering when the pg changes, and ignore pre-change sub_op messages. --- src/osd/ReplicatedPG.cc | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index f6f0942973552..963e5bd9c313e 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -2573,16 +2573,6 @@ void ReplicatedPG::sub_op_push(MOSDSubOp *op) interval_set<__u64> data_subset; map > clone_subsets; - // are we missing (this specific version)? - // (if version is wrong, it is either old (we don't want it) or - // newer (peering is buggy)) - if (!missing.is_missing(soid, v)) { - dout(7) << "sub_op_push not missing " << soid << " v" << v << dendl; - dout(15) << " but i AM missing " << missing.missing << dendl; - delete op; - return; - } - bufferlist data; data.claim(op->get_data()); @@ -2697,18 +2687,20 @@ void ReplicatedPG::sub_op_push(MOSDSubOp *op) } } + if (missing.is_missing(soid, v)) { + dout(10) << "got missing " << soid << " v " << v << dendl; + missing.got(soid, v); - missing.got(soid, v); - - // raise last_complete? - while (log.complete_to != log.log.end()) { - if (missing.missing.count(log.complete_to->soid)) - break; - if (info.last_complete < log.complete_to->version) - info.last_complete = log.complete_to->version; - log.complete_to++; + // raise last_complete? + while (log.complete_to != log.log.end()) { + if (missing.missing.count(log.complete_to->soid)) + break; + if (info.last_complete < log.complete_to->version) + info.last_complete = log.complete_to->version; + log.complete_to++; + } + dout(10) << "last_complete now " << info.last_complete << dendl; } - dout(10) << "last_complete now " << info.last_complete << dendl; // apply to disk! write_info(t); -- 2.39.5