From d7284268f908299fbd42bdb56ee0f9eea397a463 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 18 Mar 2014 12:35:03 -0700 Subject: [PATCH] PG::start_peering_interval: always send_notify if !primary Otherwise, we might get into a situation where the primary forgets about a stray pg. This is simpler and does not increase the number of notifies by much. Fixes: #7733 Signed-off-by: Samuel Just --- src/osd/PG.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index a4029f82a0bc8..3dd8d41c4f736 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4725,6 +4725,9 @@ void PG::start_peering_interval( assert(!deleting); + // should we tell the primary we are here? + send_notify = !is_primary(); + if (role != oldrole || was_old_primary != is_primary()) { // did primary change? @@ -4747,16 +4750,10 @@ void PG::start_peering_interval( // take active waiters requeue_ops(waiting_for_active); - // should we tell the primary we are here? - send_notify = !is_primary(); - } else { // no role change. // did primary change? if (get_primary() != old_acting_primary) { - // we need to announce - send_notify = true; - dout(10) << *this << " " << oldacting << " -> " << acting << ", acting primary " << old_acting_primary << " -> " << get_primary() -- 2.39.5