osd: Use one timestamp for picking recovery and arming its retry timer #146

Merged
vitalif merged 1 commits from koolkhel/vitastor:osd-recovery-retry-clock into master 2026-11-22 22:57:27 +03:00
Contributor

Description

Followup to #143. pick_next_recovery() and schedule_recovery_retry() each read the clock. A PG pause that ended between the two reads was skipped by the pick but not counted by the timer, so no timer was armed and the PG's recovery waited for an unrelated event (a PG state change, another recovery operation finishing). Now continue_recovery() takes the time once for both, and the timer is armed for at least 1 us in case the pause already ended.

Tested: tests/test_recovery_enospc.sh passes (25 ENOSPC recovery failures, recovery resumes by the timer after rm-data). The window is microseconds wide, so there is no deterministic test for it.

Contributor Name

Yury Luneff (MIND Software LLC, https://mindsw.io)

CLA

### Description Followup to #143. `pick_next_recovery()` and `schedule_recovery_retry()` each read the clock. A PG pause that ended between the two reads was skipped by the pick but not counted by the timer, so no timer was armed and the PG's recovery waited for an unrelated event (a PG state change, another recovery operation finishing). Now `continue_recovery()` takes the time once for both, and the timer is armed for at least 1 us in case the pause already ended. Tested: `tests/test_recovery_enospc.sh` passes (25 ENOSPC recovery failures, recovery resumes by the timer after `rm-data`). The window is microseconds wide, so there is no deterministic test for it. ### Contributor Name Yury Luneff (MIND Software LLC, https://mindsw.io) ### CLA - [x] I accept Vitastor CLA agreement: https://git.yourcmc.ru/vitalif/vitastor/src/branch/master/CLA-en.md
koolkhel added 1 commit 2026-11-21 17:35:41 +03:00
pick_next_recovery() and schedule_recovery_retry() each read the clock.
A PG pause that ended between the two reads was skipped by the pick but
not counted by the timer, so no timer was armed and the PG's recovery
waited for an unrelated event. Take the time once in continue_recovery()
and arm the timer for at least 1 us.
vitalif requested changes 2026-11-22 15:29:06 +03:00
vitalif left a comment
Owner

Rebase please

Rebase please
Author
Contributor

Rebased onto current master (483f5818); only the context changed around the new tombstone loop in pick_next_recovery(), the patch lines are the same. tests/test_recovery_enospc.sh passes after the rebase.

Rebased onto current master (483f5818); only the context changed around the new tombstone loop in `pick_next_recovery()`, the patch lines are the same. `tests/test_recovery_enospc.sh` passes after the rebase.
koolkhel force-pushed osd-recovery-retry-clock from 1b127186fa to 332c06989f 2026-11-22 16:51:27 +03:00 Compare
vitalif merged commit f0afdce8b0 into master 2026-11-22 22:57:27 +03:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vitalif/vitastor#146
No description provided.