Some services need to update internal state based on other service's
state, and thus need to be run after everyone has pulled their info out of
paxos.
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
for (int i = 0; i < PAXOS_NUM; ++i) {
paxos_service[i]->refresh(need_bootstrap);
}
+ for (int i = 0; i < PAXOS_NUM; ++i) {
+ paxos_service[i]->post_paxos_update();
+ }
}
void Monitor::register_cluster_logger()
*/
virtual void update_from_paxos(bool *need_bootstrap) = 0;
+ /**
+ * Hook called after all services have refreshed their state from paxos
+ *
+ * This is useful for doing any update work that depends on other
+ * service's having up-to-date state.
+ */
+ virtual void post_paxos_update() {}
+
/**
* Init on startup
*