From: Prashant D Date: Tue, 12 Sep 2023 18:58:23 +0000 (-0400) Subject: pacific: osd/scrub: Fix scrub starts messages spamming the cluster log X-Git-Tag: v16.2.15~161^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e76d5e90c3a99303034986eb41a26e050e8ba75f;p=ceph.git pacific: osd/scrub: Fix scrub starts messages spamming the cluster log 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 --- diff --git a/src/osd/scrub_machine.cc b/src/osd/scrub_machine.cc index fff3720817e7..60bfcce6a5e7 100644 --- a/src/osd/scrub_machine.cc +++ b/src/osd/scrub_machine.cc @@ -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(); }