Skip to content

Commit

Permalink
mon: update PaxosService::cached_first_committed in PaxosService::may…
Browse files Browse the repository at this point in the history
…be_trim()

This should be able to avoid interleaving execution of Paxos::commit_finish() and
check_sub(), which could lead to unexpected failure of ceph-mon.

Fixes: http://tracker.ceph.com/issues/11332
Signed-off-by: Xuehan Xu <xuxuehan@360.cn>
Signed-off-by: yupeng chen <chenyupeng-it@360.cn>
  • Loading branch information
xuxuehan committed Jan 10, 2018
1 parent 1f32d63 commit c3c88d8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mon/PaxosService.cc
Expand Up @@ -399,6 +399,7 @@ void PaxosService::maybe_trim()
MonitorDBStore::TransactionRef t = paxos->get_pending_transaction();
trim(t, get_first_committed(), trim_to);
put_first_committed(t, trim_to);
cached_first_committed = trim_to;

// let the service add any extra stuff
encode_trim_extra(t, trim_to);
Expand Down

0 comments on commit c3c88d8

Please sign in to comment.