summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-03-14 19:59:36 -0700
committerSamuel Just <sam.just@inktank.com>2013-03-19 10:32:36 -0700
commit7ec68e2d45b431a3a77458939622e6ea1e396d0e (patch)
tree4bda789e647a74be3c03633c5bfd0f33af35df12
parentb279b148b38c755d2dcca6524d7b8a95daf123a0 (diff)
downloadceph-7ec68e2d45b431a3a77458939622e6ea1e396d0e.tar.gz
PG: ignore non MISSING pg query in ReplicaActive
1) Replica sends notify 2) Prior to processing notify, primary queues query to replica 3) Primary processes notify and activates sending MOSDPGLog to replica. 4) Primary does do_notifies at end of process_peering_events and sends to Query. 5) Replica sees MOSDPGLog and activates 6) Replica sees Query and asserts. In the above case, the Replica should simply ignore the old Query. Fixes: #4050 Backport: bobtail Signed-off-by: Samuel Just <sam.just@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> (cherry picked from commit 8222cbc8f35c359a35f8381ad90ff0eed5615dac)
-rw-r--r--src/osd/PG.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc
index 23f1623d7fe..982ce1a3d76 100644
--- a/src/osd/PG.cc
+++ b/src/osd/PG.cc
@@ -6239,9 +6239,10 @@ boost::statechart::result PG::RecoveryState::ReplicaActive::react(const ActMap&)
boost::statechart::result PG::RecoveryState::ReplicaActive::react(const MQuery& query)
{
PG *pg = context< RecoveryMachine >().pg;
- assert(query.query.type == pg_query_t::MISSING);
- pg->update_history_from_master(query.query.history);
- pg->fulfill_log(query.from, query.query, query.query_epoch);
+ if (query.query.type == pg_query_t::MISSING) {
+ pg->update_history_from_master(query.query.history);
+ pg->fulfill_log(query.from, query.query, query.query_epoch);
+ } // else: from prior to activation, safe to ignore
return discard_event();
}