osd: Re-arm scrub timer for remaining scheduled PGs in pick_next_scrub #226

Open
changwei.ye wants to merge 1 commits from changwei.ye/vitastor:fix-pick-next-scrub into master
Contributor

Description

osd: Re-arm scrub timer for remaining scheduled PGs in pick_next_scrub

When pick_next_scrub finishes due PGs and skips PGs whose next_scrub is still
in the future, track the earliest remaining PG and call schedule_scrub on it
before returning 0.

Otherwise, after the single OSD scrub timer fires, any remaining PG with a
later next_scrub (even within the same pool, e.g. due to staggered scrub
completion times, PG migration, different pool intervals, or manual schedules)
is left without a timer until the finished PG's next cycle (auto_scrub=true)
or indefinitely (auto_scrub=false).

Add regression tests covering both auto_scrub=false and auto_scrub=true.

Contributor Name

Changwei Ye

CLA

### Description osd: Re-arm scrub timer for remaining scheduled PGs in pick_next_scrub When pick_next_scrub finishes due PGs and skips PGs whose next_scrub is still in the future, track the earliest remaining PG and call schedule_scrub on it before returning 0. Otherwise, after the single OSD scrub timer fires, any remaining PG with a later next_scrub (even within the same pool, e.g. due to staggered scrub completion times, PG migration, different pool intervals, or manual schedules) is left without a timer until the finished PG's next cycle (auto_scrub=true) or indefinitely (auto_scrub=false). Add regression tests covering both auto_scrub=false and auto_scrub=true. ### Contributor Name Changwei Ye ### CLA - [x] I accept Vitastor CLA agreement: https://git.yourcmc.ru/vitalif/vitastor/src/branch/master/CLA-en.md
changwei.ye added 1 commit 2026-12-04 08:59:26 +03:00
When pick_next_scrub finishes due PGs and skips PGs whose next_scrub is still
in the future, track the earliest remaining PG and call schedule_scrub on it
before returning 0.

Otherwise, after the single OSD scrub timer fires, any remaining PG with a
later next_scrub (even within the same pool, e.g. due to staggered scrub
completion times, PG migration, different pool intervals, or manual schedules)
is left without a timer until the finished PG's next cycle (auto_scrub=true)
or indefinitely (auto_scrub=false).

Add regression tests covering both auto_scrub=false and auto_scrub=true.
changwei.ye requested review from vitalif 2026-12-04 08:59:35 +03:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fix-pick-next-scrub:changwei.ye-fix-pick-next-scrub
git checkout changwei.ye-fix-pick-next-scrub
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vitalif/vitastor#226
No description provided.