]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/Paxos: always refresh after any store_state
authorSage Weil <sage@inktank.com>
Tue, 20 Aug 2013 18:27:23 +0000 (11:27 -0700)
committerSage Weil <sage@inktank.com>
Tue, 20 Aug 2013 18:27:23 +0000 (11:27 -0700)
commit981eda9f7787c83dc457f061452685f499e7dd27
tree997c3cbd39a2d99bf3739126f12a7b912a0c0887
parent7e0848d8f88f156a05eef47a9f730b772b64fbf2
mon/Paxos: always refresh after any store_state

If we store any new state, we need to refresh the services, even if we
are still in the midst of Paxos recovery.  This is because the
subscription path will share any committed state even when paxos is
still recovering.  This prevents a race like:

 - we have maps 10..20
 - we drop out of quorum
 - we are elected leader, paxos recovery starts
 - we get one LAST with committed states that trim maps 10..15
 - we get a subscribe for map 10..20
   - we crash because 10 is no longer on disk because the PaxosService
     is out of sync with the on-disk state.

Fixes: #6045
Backport: dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/mon/Paxos.cc