]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: PG can receive a log in WaitActingChange requested in GetLog
authorSamuel Just <samuel.just@dreamhost.com>
Tue, 17 May 2011 16:57:09 +0000 (09:57 -0700)
committerSamuel Just <samuel.just@dreamhost.com>
Tue, 17 May 2011 16:58:06 +0000 (09:58 -0700)
Discard logs requested during GetLog once we are in WaitActingChange.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
src/osd/PG.cc
src/osd/PG.h

index c6cf70ebe5687385db94441fd4aa2fcd0d372396..4c748b4c4b041641c641225e7dd8a14a115f6452 100644 (file)
@@ -4445,6 +4445,12 @@ PG::RecoveryState::WaitActingChange::WaitActingChange(my_context ctx) : my_base(
   context< RecoveryMachine >().log_enter(state_name);
 }
 
+boost::statechart::result 
+PG::RecoveryState::WaitActingChange::react(const MLogRec& logevt) {
+  dout(10) << "In WaitActingChange, ignoring MLocRec" << dendl;
+  return discard_event();
+}
+
 void PG::RecoveryState::WaitActingChange::exit() {
   context< RecoveryMachine >().log_exit(state_name, enter_time);
 }
index 8768c39b267326ea39ec2919489b43da3c008ad9..2dbed3a4a7c9d31a8b816f9031e7787ae18dfb3c 100644 (file)
@@ -1090,7 +1090,11 @@ public:
 
     struct WaitActingChange : boost::statechart::state< WaitActingChange, Primary>,
                              NamedState {
+      typedef boost::mpl::list <
+       boost::statechart::custom_reaction< MLogRec >
+       > reactions;
       WaitActingChange(my_context ctx);
+      boost::statechart::result react(const MLogRec&);
       void exit();
     };