]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: PaxosService: call post_refresh() instead of post_paxos_update() 5358/head
authorJoao Eduardo Luis <joao@suse.de>
Fri, 12 Jun 2015 18:21:10 +0000 (19:21 +0100)
committerJoao Eduardo Luis <joao@redhat.com>
Mon, 27 Jul 2015 20:53:38 +0000 (21:53 +0100)
commit2f35a415dcd31683151defb0ddb1a6d5696c7051
tree7b497f380b962d8dd5880555db6276692c68cca2
parentabe6c03d411f5f1d277f910ae87123309fa95d4a
mon: PaxosService: call post_refresh() instead of post_paxos_update()

Whenever the monitor finishes committing a proposal, we call
Monitor::refresh_from_paxos() to nudge the services to refresh.  Once
all services have refreshed, we would then call each services
post_paxos_update().

However, due to an unfortunate, non-critical bug, some services (mainly
the LogMonitor) could have messages pending in their
'waiting_for_finished_proposal' callback queue [1], and we need to nudge
those callbacks.

This patch adds a new step during the refresh phase: instead of calling
directly the service's post_paxos_update(), we introduce a
PaxosService::post_refresh() which will call the services
post_paxos_update() function first and then nudge those callbacks when
appropriate.

[1] - Given the monitor will send MLog messages to itself, and given the
service is not readable before its initial state is proposed and
committed, some of the initial MLog's would be stuck waiting for the
proposal to finish.  However, by design, we only nudge those message's
callbacks when an election finishes or, if the leader, when the proposal
finishes.  On peons, however, we would only nudge those callbacks if an
election happened to be triggered, hence the need for an alternate path
to retry any message waiting for the initial proposal to finish.

Fixes: #11470
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
(cherry picked from commit 1551ebb63238073d2fd30201e6b656a8988e958c)
src/mon/Monitor.cc
src/mon/PaxosService.cc
src/mon/PaxosService.h