]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/scrub: auto-correct accounting-only stat mismatches 68684/head
authorRonen Friedman <rfriedma@redhat.com>
Thu, 30 Apr 2026 08:50:08 +0000 (08:50 +0000)
committerRonen Friedman <rfriedma@redhat.com>
Thu, 30 Apr 2026 15:56:30 +0000 (15:56 +0000)
commitf827e4dafc593fc6ef6cee2ccc4d311019ad14e9
treea0e2f9349e257f1874b3dd69167006be98f7f5d0
parent6a8ef027c86f90259aff3568987962578631eb30
osd/scrub: auto-correct accounting-only stat mismatches

When scrub detects a PG stats mismatch but no object-level
inconsistencies (all replicas agree on actual data), fix the
stats in place rather than reporting a scrub error.

Previously, a pure stat mismatch would log [ERR], increment
shallow_errors, and trigger OSD_SCRUB_ERRORS / PG_STATE_INCONSISTENT
health alerts — yet leave the stats unfixed unless a repair
scrub was manually initiated. The scrubber's own object count
is authoritative in this case.

Persistence of the corrected stats is deferred until the next
transaction that sets dirty_info, consistent with the existing
stats_invalid repair path.

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