]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pacific: osd/scrub: Fix scrub starts messages spamming the cluster log 53430/head
authorPrashant D <pdhange@redhat.com>
Tue, 12 Sep 2023 18:58:23 +0000 (14:58 -0400)
committerPrashant D <pdhange@redhat.com>
Tue, 12 Sep 2023 18:58:23 +0000 (14:58 -0400)
With the re-introduction of scrub starts message in commit-id e0c0b4f,
the cluster log is getting spammed by scrub *starts* for the same
PG. This is due to replicas rejecting the scrub reserve requests
resulting in scrub getting rescheduled for the same PG continuously.
Instead of logging the scrub *starts* message before scrub reservation
is done by all acting set OSDs, log *starts* message when active
scrubbing starts for the PG. The reservations period is expected
to take up to a few milliseconds and the scrubbing itself consumes the
most of the scrub period.

Fixes: https://tracker.ceph.com/issues/62669
Signed-off-by: Prashant D <pdhange@redhat.com>
src/osd/scrub_machine.cc

index fff3720817e74a04294c8d40d15729b5afccf794..60bfcce6a5e7f8dc9a67d85eda763d91f8bee047 100644 (file)
@@ -103,7 +103,6 @@ ReservingReplicas::ReservingReplicas(my_context ctx) : my_base(ctx)
 {
   dout(10) << "-- state -->> ReservingReplicas" << dendl;
   DECLARE_LOCALS;  // 'scrbr' & 'pg_id' aliases
-  scrbr->scrub_begin();
   scrbr->reserve_replicas();
 }
 
@@ -132,6 +131,7 @@ ActiveScrubbing::ActiveScrubbing(my_context ctx) : my_base(ctx)
 {
   dout(10) << "-- state -->> ActiveScrubbing" << dendl;
   DECLARE_LOCALS;  // 'scrbr' & 'pg_id' aliases
+  scrbr->scrub_begin();
   scrbr->on_init();
 }