From: Kefu Chai Date: Mon, 30 Oct 2017 06:36:24 +0000 (+0800) Subject: mon: amend the comment of WRITE -> REFRESH transition X-Git-Tag: v13.0.1~237^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c5cf108467a4fdf119d1203a3402fd5a5e5c1782;p=ceph.git mon: amend the comment of WRITE -> REFRESH transition set the paxos's state to STATE_REFRESH avoid doing store->flush() while we are in the async completion thread. this causes dead lock. Signed-off-by: Kefu Chai --- diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index ea2aeaf923d6..2d395caceb03 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -923,8 +923,9 @@ void Paxos::commit_finish() new_value.clear(); // WRITING -> REFRESH - // among other things, this lets do_refresh() -> mon->bootstrap() know - // it doesn't need to flush the store queue + // among other things, this lets do_refresh() -> mon->bootstrap() -> + // wait_for_paxos_write() know that it doesn't need to flush the store + // queue. and it should not, as we are in the async completion thread now! assert(is_writing() || is_writing_previous()); state = STATE_REFRESH; assert(commits_started > 0);