]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: allow RecoveryDone self-transition in RepNotRecovering
authorSage Weil <sage@inktank.com>
Fri, 28 Dec 2012 19:34:47 +0000 (11:34 -0800)
committerSage Weil <sage@inktank.com>
Fri, 28 Dec 2012 23:03:10 +0000 (15:03 -0800)
In a mixed cluster where some OSDs support the recovery reservations and
some don't, the replica may be new code in RepNotRecoverying and will
complete a backfill.  In that case, we want to just stayin
RepNotRecovering.

It may also be possible to make it infer what the primary is doing even
thought it is not sending recovery reservation messages, but this is much
more complicated and doesn't accomplish much.

Fixes: #3689
Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/PG.h

index 46ae2d9127c83cbf6aca470c4b7a9a18ad73384b..bc67ef6ea2c9850aad10452686d61cac0acef9e7 100644 (file)
@@ -1498,7 +1498,8 @@ public:
     struct RepNotRecovering : boost::statechart::state< RepNotRecovering, ReplicaActive>, NamedState {
       typedef boost::mpl::list<
        boost::statechart::transition< RequestBackfill, RepWaitBackfillReserved >,
-        boost::statechart::transition< RequestRecovery, RepWaitRecoveryReserved >
+        boost::statechart::transition< RequestRecovery, RepWaitRecoveryReserved >,
+       boost::statechart::transition< RecoveryDone, RepNotRecovering >  // for compat with pre-reservation peers
        > reactions;
       RepNotRecovering(my_context ctx);
       void exit();