]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: always clear_primary_state when leaving Primary
authorSamuel Just <sjust@redhat.com>
Fri, 14 Nov 2014 23:44:20 +0000 (15:44 -0800)
committerLoic Dachary <ldachary@redhat.com>
Wed, 11 Mar 2015 09:39:16 +0000 (10:39 +0100)
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 <sjust@redhat.com>
(cherry picked from commit c87bde64dfccb5d6ee2877cc74c66fc064b1bcd7)

src/osd/PG.cc

index ebc2020cfff2734cca82490b2d357ac45e164830..31c108a4c3cf25b983c7a6e244b38e50c2359943 100644 (file)
@@ -5669,6 +5669,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--------*/