]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/scrub: log scrub-queue advance_time() failures 62010/head
authorRonen Friedman <rfriedma@redhat.com>
Wed, 26 Feb 2025 15:10:54 +0000 (09:10 -0600)
committerRonen Friedman <rfriedma@redhat.com>
Fri, 28 Feb 2025 09:21:07 +0000 (03:21 -0600)
such failures occur when the "Ceph clock" goes backwards,

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/scrubber/osd_scrub_sched.cc

index 7348bbf46990e29669edcfe7a23e90402006ea5b..a45c817b38bd8d88ef526ba2d0816d8a7dc425b2 100644 (file)
@@ -92,7 +92,15 @@ std::optional<Scrub::SchedEntry> ScrubQueue::pop_ready_entry(
   };
 
   std::unique_lock lck{jobs_lock};
-  to_scrub.advance_time(time_now);
+  if (!to_scrub.advance_time(time_now)) {
+    // the clock was not advanced
+    dout(5) << fmt::format(
+                  ": time now ({}) is earlier than the previous not-before "
+                  "cut-off time",
+                  time_now)
+           << dendl;
+    // we still try to dequeue, mainly to handle possible corner cases
+  }
   return to_scrub.dequeue_by_pred(eligible_filtr);
 }