]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: amend the comment of WRITE -> REFRESH transition 18617/head
authorKefu Chai <kchai@redhat.com>
Mon, 30 Oct 2017 06:36:24 +0000 (14:36 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 6 Nov 2017 04:12:43 +0000 (12:12 +0800)
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 <kchai@redhat.com>
src/mon/Paxos.cc

index ea2aeaf923d643facbd145a6a8fbf9e1f22bc457..2d395caceb03c479ff83f221f95f23ebecdbc296 100644 (file)
@@ -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);