Skip to content

Commit

Permalink
PG: always clear_primary_state when leaving Primary
Browse files Browse the repository at this point in the history
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 c87bde6)
  • Loading branch information
athanatos authored and ldachary committed Mar 19, 2015
1 parent 1f58a0a commit 0c3f763
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/osd/PG.cc
Expand Up @@ -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--------*/
Expand Down

0 comments on commit 0c3f763

Please sign in to comment.