]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: ignore MInfoRec, MNotifyRec in WaitActingChange
authorSage Weil <sage@newdream.net>
Mon, 23 Jan 2012 18:21:04 +0000 (10:21 -0800)
committerSage Weil <sage@newdream.net>
Mon, 23 Jan 2012 18:21:22 +0000 (10:21 -0800)
We should ignore logs, infos, and notifies while we are waiting for the
map to change.  Peering has reached a dead-end (we need acting to change)
and we will redo our work when that happens.  That includes the replicas
resending notifies.

Fixes: #1958
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
src/osd/PG.cc
src/osd/PG.h

index bba0d969a3309774670b981069f9e2c6b4e6ec20..e1dd7539960ba7c926fc925cd43a56039ff1b439 100644 (file)
@@ -4406,6 +4406,18 @@ boost::statechart::result PG::RecoveryState::WaitActingChange::react(const MLogR
   return discard_event();
 }
 
+boost::statechart::result PG::RecoveryState::WaitActingChange::react(const MInfoRec& evt)
+{
+  dout(10) << "In WaitActingChange, ignoring MInfoRec" << dendl;
+  return discard_event();
+}
+
+boost::statechart::result PG::RecoveryState::WaitActingChange::react(const MNotifyRec& evt)
+{
+  dout(10) << "In WaitActingChange, ignoring MNotifyRec" << dendl;
+  return discard_event();
+}
+
 void PG::RecoveryState::WaitActingChange::exit()
 {
   context< RecoveryMachine >().log_exit(state_name, enter_time);
index 2c2bf912b757ecf57d59f98abbca0cc3824e4c4f..1619e1ee8f00bba33ffe1ef90aea7bb23c8dbbea 100644 (file)
@@ -1209,10 +1209,14 @@ public:
     struct WaitActingChange : boost::statechart::state< WaitActingChange, Primary>,
                              NamedState {
       typedef boost::mpl::list <
-       boost::statechart::custom_reaction< MLogRec >
+       boost::statechart::custom_reaction< MLogRec >,
+       boost::statechart::custom_reaction< MInfoRec >,
+       boost::statechart::custom_reaction< MNotifyRec >
        > reactions;
       WaitActingChange(my_context ctx);
       boost::statechart::result react(const MLogRec&);
+      boost::statechart::result react(const MInfoRec&);
+      boost::statechart::result react(const MNotifyRec&);
       void exit();
     };