mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
Merge pull request #14855 from tchaikov/wip-increase-lec
mon/OSDMonitor: increase last_epoch_clean's lower bound if possible Reviewed-by: Gregory Farnum <gfarnum@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
11247bda59
@ -80,13 +80,21 @@ void LastEpochClean::Lec::report(ps_t ps, epoch_t last_epoch_clean)
|
||||
if (epoch_by_pg.size() <= ps) {
|
||||
epoch_by_pg.resize(ps + 1, 0);
|
||||
}
|
||||
if (epoch_by_pg[ps] >= last_epoch_clean) {
|
||||
const auto old_lec = epoch_by_pg[ps];
|
||||
if (old_lec >= last_epoch_clean) {
|
||||
// stale lec
|
||||
return;
|
||||
}
|
||||
epoch_by_pg[ps] = last_epoch_clean;
|
||||
if (last_epoch_clean < floor) {
|
||||
floor = last_epoch_clean;
|
||||
} else if (last_epoch_clean > floor) {
|
||||
if (old_lec == floor) {
|
||||
// probably should increase floor?
|
||||
auto new_floor = std::min_element(std::begin(epoch_by_pg),
|
||||
std::end(epoch_by_pg));
|
||||
floor = *new_floor;
|
||||
}
|
||||
}
|
||||
if (ps != next_missing) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user