Skip to content

Reset execution counters when retrying failed jobs in bulk - #817

Merged
rosa merged 1 commit into
rails:mainfrom
ydah:fix-bulk-retry-counters
Nov 3, 2026
Merged

rosa merged 1 commit into
rails:mainfrom
ydah:fix-bulk-retry-counters

Conversation

@ydah

@ydah ydah commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

FailedExecution.retry_all leaves the serialized retry counters intact, so a job that exhausted retry_on fails immediately on its next error after a bulk retry.

Reset the counters on the locked failed jobs before dispatching them, using the same helper as single-job retries. The regression test verifies that executions becomes 0, exception_executions becomes {}, automatic retries resume, and finished jobs included in the input retain their counters.

@rosa
rosa force-pushed the fix-bulk-retry-counters branch from 2c8605a to ded6249 Compare November 2, 2026 19:01
@rosa

rosa commented Nov 3, 2026

Copy link
Copy Markdown
Member

Oh, great catch! Awesome, thanks @ydah.

@rosa
rosa merged commit f7aad1b into rails:main Nov 3, 2026
58 checks passed
@ydah
ydah deleted the fix-bulk-retry-counters branch November 3, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants