]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/Paxos: commit only after entire quorum acks
authorSage Weil <sage@inktank.com>
Mon, 17 Mar 2014 23:21:17 +0000 (16:21 -0700)
committerSage Weil <sage@inktank.com>
Mon, 17 Mar 2014 23:21:56 +0000 (16:21 -0700)
commitfa1d957c115a440e162dba1b1002bc41fc1eac43
treee0f0622d0299baea14e9ef75f0710cba813441a0
parent1048763e33a4423e52fb8fc610a28dd55464f1c5
mon/Paxos: commit only after entire quorum acks

If a subset of the quorum accepts the proposal and we commit, we will start
sharing the new state.  However, the mon that didn't yet reply with the
accept may still be sharing the old and stale value.

The simplest way to prevent this is not to commit until the entire quorum
replies.  In the general case, there are no failures and this is just fine.
In the failure case, we will call a new election and have a smaller quorum
of (live) nodes and will recommit the same value.

A more performant solution would be to have a separate message invalidate
the old state and commit once we have all invalidations and a majority of
accepts.  This will lower latency a bit in the non-failure case, but not
change the failure case significantly.  Later!

Fixes: #7736
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/mon/Paxos.cc