Skip to content

Commit

Permalink
Merge pull request #5359 from ceph/wip-11470.hammer
Browse files Browse the repository at this point in the history
mon: PaxosService: call post_refresh() instead of post_paxos_update()

Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
Loic Dachary committed Aug 30, 2015
2 parents ed162d4 + d08db7a commit 574932b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/mon/Monitor.cc
Expand Up @@ -788,7 +788,7 @@ void Monitor::refresh_from_paxos(bool *need_bootstrap)
paxos_service[i]->refresh(need_bootstrap);
}
for (int i = 0; i < PAXOS_NUM; ++i) {
paxos_service[i]->post_paxos_update();
paxos_service[i]->post_refresh();
}
}

Expand Down
10 changes: 10 additions & 0 deletions src/mon/PaxosService.cc
Expand Up @@ -128,6 +128,16 @@ void PaxosService::refresh(bool *need_bootstrap)
update_from_paxos(need_bootstrap);
}

void PaxosService::post_refresh()
{
dout(10) << __func__ << dendl;

post_paxos_update();

if (mon->is_peon() && !waiting_for_finished_proposal.empty()) {
finish_contexts(g_ceph_context, waiting_for_finished_proposal, -EAGAIN);
}
}

void PaxosService::remove_legacy_versions()
{
Expand Down
1 change: 1 addition & 0 deletions src/mon/PaxosService.h
Expand Up @@ -322,6 +322,7 @@ class PaxosService {
bool dispatch(PaxosServiceMessage *m);

void refresh(bool *need_bootstrap);
void post_refresh();

/**
* @defgroup PaxosService_h_override_funcs Functions that should be
Expand Down

0 comments on commit 574932b

Please sign in to comment.