Skip to content

Commit d7f9aec

Browse files
committed
osd/scrub: log scrub-queue advance_time() failures
such failures occur when the "Ceph clock" goes backwards, Signed-off-by: Ronen Friedman <[email protected]>
1 parent 7ba63ac commit d7f9aec

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/osd/scrubber/osd_scrub_sched.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,15 @@ std::optional<Scrub::SchedEntry> ScrubQueue::pop_ready_entry(
9292
};
9393

9494
std::unique_lock lck{jobs_lock};
95-
to_scrub.advance_time(time_now);
95+
if (!to_scrub.advance_time(time_now)) {
96+
// the clock was not advanced
97+
dout(5) << fmt::format(
98+
": time now ({}) is earlier than the previous not-before "
99+
"cut-off time",
100+
time_now)
101+
<< dendl;
102+
// we still try to dequeue, mainly to handle possible corner cases
103+
}
96104
return to_scrub.dequeue_by_pred(eligible_filtr);
97105
}
98106

0 commit comments

Comments
 (0)