Proposing a new state from within update_from_paxos() confuses some callers,
like PaxosService::_active(). Instead, do it in the on_active() callback.
This also let's us collapse the check_osd_map() caller into on_active(),
and makes it happen on leaders and peons alike, which ought to avoid some
of the pg creation lag we see sometimes (presumably when the osds have
sessions with peons instead of the leader).
Fixes: #1708
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
if (mon->is_leader()) {
check_osd_map(mon->osdmon()->osdmap.epoch);
}
+ send_pg_creates();
}
void PGMonitor::tick()
paxosv > max)
paxos->trim_to(paxosv - max);
- send_pg_creates();
-
return true;
}
if (propose)
propose_pending();
-
- send_pg_creates();
}
void PGMonitor::register_pg(pg_pool_t& pool, pg_t pgid, epoch_t epoch, bool new_pool)