This avoid duplicated code by using the helper created exactly for this
purpose.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit
b9dee2285d9fe8533fa98c940d5af7b0b81f3d33)
store_state(commit);
- commit->put();
-
- bool need_bootstrap = false;
- mon->refresh_from_paxos(&need_bootstrap);
- if (need_bootstrap) {
- dout(10) << " doing requested bootstrap" << dendl;
- mon->bootstrap();
- return;
+ if (do_refresh()) {
+ finish_contexts(g_ceph_context, waiting_for_commit);
}
- finish_contexts(g_ceph_context, waiting_for_commit);
+ commit->put();
}
void Paxos::extend_lease()