mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
mon: fix osdmap trimming unsigned overflow
This was trimming way to aggressively for early epochs due to the unsigned version overflowing. Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
4fe9cca5dd
commit
6e04f60ed4
@ -1113,7 +1113,8 @@ void OSDMonitor::tick()
|
||||
mon->pgmon()->pg_map.creating_pgs.empty()) {
|
||||
epoch_t floor = mon->pgmon()->pg_map.calc_min_last_epoch_clean();
|
||||
dout(10) << " min_last_epoch_clean " << floor << dendl;
|
||||
if (floor < paxos->get_version() - 10) {
|
||||
unsigned min = 100;
|
||||
if (floor + min < paxos->get_version()) {
|
||||
epoch_t of = paxos->get_first_committed();
|
||||
paxos->trim_to(floor);
|
||||
while (of < floor) {
|
||||
|
Loading…
Reference in New Issue
Block a user