]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon: fix monitor cluster contraction race
authorSage Weil <sage@inktank.com>
Tue, 21 Aug 2012 00:04:58 +0000 (17:04 -0700)
committerSage Weil <sage@inktank.com>
Tue, 21 Aug 2012 16:03:33 +0000 (09:03 -0700)
commit2e8689a49983dd678d5010aa589ff38b71213e54
tree929e7442b59dbde01cdeed403d999622322b8507
parent81694c39d07cc27e412dc1d2a64f9a0ed0faacf0
mon: fix monitor cluster contraction race

If we contract to 1 monitor, we win_standalone_election() without bumping
the election epoch.  Racing paxos updates can then reach us without being
ignored and trigger an assert:

mon/Paxos.cc: In function 'void Paxos::handle_accept(MMonPaxos*)' thread 7f85eae05700 time 2012-08-20 16:01:00.843937
mon/Paxos.cc: 468: FAILED assert(state == STATE_UPDATING)

Fixes: #3003
Reported-by: John Wilkins <john.wilkins@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/Elector.h
src/mon/Monitor.cc