From 0c3f7637d8cf2146a4268330d8c0506ad38c354d Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Fri, 14 Nov 2014 15:44:20 -0800 Subject: [PATCH] PG: always clear_primary_state when leaving Primary Otherwise, entries from the log collection process might leak into the next epoch, where we might end up choosing a different authoritative log. In this case, it resulted in us not rolling back to log entries on one of the replicas prior to trying to recover from an affected object due to the peer_missing not being cleared. Fixes: #10059 Backport: giant, firefly, dumpling Signed-off-by: Samuel Just (cherry picked from commit c87bde64dfccb5d6ee2877cc74c66fc064b1bcd7) --- src/osd/PG.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index eedc26b1d02b1..39d4ad9ad2414 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -5534,6 +5534,7 @@ void PG::RecoveryState::Primary::exit() pg->want_acting.clear(); utime_t dur = ceph_clock_now(pg->cct) - enter_time; pg->osd->recoverystate_perf->tinc(rs_primary_latency, dur); + pg->clear_primary_state(); } /*---------Peering--------*/ -- 2.39.5