]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: ignore dup activation messages
authorSage Weil <sage@redhat.com>
Wed, 29 Nov 2017 21:37:03 +0000 (15:37 -0600)
committerSage Weil <sage@redhat.com>
Wed, 29 Nov 2017 22:07:59 +0000 (16:07 -0600)
If we get a dup info from a replica, do not finish activation twice--this
will confuse the peering state machine, which does not expect
AllReplicasActivated from the Active state.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc

index 77f346c7ae7818307d19477f94d72cce9c9b9f64..792165ba3ac6c89734df06a41b85809e78aef2ff 100644 (file)
@@ -1907,9 +1907,10 @@ void PG::_activate_committed(epoch_t epoch, epoch_t activation_epoch)
     dout(10) << "_activate_committed " << epoch
             << ", that was an old interval" << dendl;
   } else if (is_primary()) {
+    assert(!peer_activated.count(pg_whoami));
     peer_activated.insert(pg_whoami);
     dout(10) << "_activate_committed " << epoch
-            << " peer_activated now " << peer_activated 
+            << " peer_activated now " << peer_activated
             << " last_interval_started " << info.history.last_interval_started
             << " last_epoch_started " << info.history.last_epoch_started
             << " same_interval_since " << info.history.same_interval_since << dendl;
@@ -7381,7 +7382,8 @@ boost::statechart::result PG::RecoveryState::Active::react(const MInfoRec& infoe
   // don't update history (yet) if we are active and primary; the replica
   // may be telling us they have activated (and committed) but we can't
   // share that until _everyone_ does the same.
-  if (pg->is_actingbackfill(infoevt.from)) {
+  if (pg->is_actingbackfill(infoevt.from) &&
+      pg->peer_activated.count(infoevt.from) == 0) {
     ldout(pg->cct, 10) << " peer osd." << infoevt.from
                       << " activated and committed" << dendl;
     pg->peer_activated.insert(infoevt.from);