mirror of
https://github.com/ceph/ceph
synced 2025-03-20 01:07:42 +00:00
mon: only re bootstrap if monmap actually changes
If we go thru here just to update latest, that's fine; no need to restart the bootstrap process. Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
622fbadd66
commit
2633d71dbd
@ -55,6 +55,8 @@ bool MonmapMonitor::update_from_paxos()
|
||||
dout(10) << "update_from_paxos paxosv " << paxosv
|
||||
<< ", my v " << mon->monmap->epoch << dendl;
|
||||
|
||||
bool need_restart = paxosv != mon->monmap->get_epoch();
|
||||
|
||||
if (paxosv > 0 && (mon->monmap->get_epoch() == 0 ||
|
||||
paxos->get_latest_version() != paxosv)) {
|
||||
bufferlist latest;
|
||||
@ -93,7 +95,8 @@ bool MonmapMonitor::update_from_paxos()
|
||||
mon->rank = rank;
|
||||
}
|
||||
|
||||
mon->bootstrap();
|
||||
if (need_restart)
|
||||
mon->bootstrap();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user