]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon: Paxos: finish queued proposals instead of clearing the list
authorJoao Eduardo Luis <joao.luis@inktank.com>
Wed, 22 May 2013 12:51:13 +0000 (13:51 +0100)
committerSage Weil <sage@inktank.com>
Mon, 27 May 2013 19:44:21 +0000 (12:44 -0700)
commitf29206bdd950d1e916a1422b4826caaf4a8cef3a
tree14e4aa4e91a1b84a2860c8dabd48c6e3ef88ec43
parentb73d7c6b7e83fe8ce29e7150f25a4cca7647cccd
mon: Paxos: finish queued proposals instead of clearing the list

By finishing these Contexts, we make sure the Contexts they enclose (to be
called once the proposal goes through) will behave as their were initially
planned:  for instance, a C_Command() may retry the command if a -EAGAIN
is passed to 'finish_contexts', while a C_Trimmed() will simply set
'going_to_trim' to false.

This aims at fixing at least a bug in which Paxos will stop trimming if an
election is triggered while a trim is queued but not yet finished.  Such
happens because it is the C_Trimmed() context that is responsible for
resetting 'going_to_trim' back to false.  By clearing all the contexts on
the proposal list instead of finishing them, we stay forever unable to
trim Paxos again as 'going_to_trim' will stay True till the end of time as
we know it.

Fixes: #4895
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 586e8c2075f721456fbd40f738dab8ccfa657aa8)
src/mon/Paxos.cc