From ca34fc4d3cb54f2621598949a72fd840532c9f75 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 28 Dec 2012 11:34:47 -0800 Subject: [PATCH] osd: allow RecoveryDone self-transition in RepNotRecovering 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 --- src/osd/PG.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osd/PG.h b/src/osd/PG.h index 46ae2d9127c..bc67ef6ea2c 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -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();