Repository navigation
Conversation
This was referenced Oct 18, 2026
alexluong
force-pushed
the
fix/retry-scheduler-load
branch
from
October 19, 2026 20:01
c263242 to
0391e80
Compare
alexluong
force-pushed
the
fix/retry-missing-attempt
branch
from
October 19, 2026 20:01
d1bbd45 to
91ebfb5
Compare
alexluong
force-pushed
the
fix/retry-scheduler-load
branch
from
October 19, 2026 20:10
0391e80 to
f0fb24f
Compare
alexluong
force-pushed
the
fix/retry-missing-attempt
branch
from
October 19, 2026 20:10
91ebfb5 to
09e74e9
Compare
alexluong
force-pushed
the
fix/retry-scheduler-load
branch
from
October 19, 2026 20:19
f0fb24f to
ae70404
Compare
alexluong
force-pushed
the
fix/retry-missing-attempt
branch
from
October 19, 2026 20:19
09e74e9 to
0f64b26
Compare
alexbouchardd
approved these changes
Oct 19, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Retries wait at least one log flush, and a retry whose failed attempt still isn't in the log store is requeued without counting the receive toward the dead-letter limit.
The race (known, accepted)
Attempts reach the log store in batches, up to
LOG_BATCH_THRESHOLD_SECONDS(default 10 s) after delivery, and nothing orders the retry after that write. A retry that runs before the write lands (a short schedule step, or a log write backlog) finds nothing:This is expected behavior and stays: the retry and the log write are separate pipelines, and there is no clear way to order them without coupling the two. This PR makes the retry wait for the write instead of treating the miss as a failure. The floor (4.) covers the usual flush; the requeue covers a backlog.
Before, a miss was an exec error: the task backed off 30 s, 60 s, ... and each miss counted toward
RETRY_MAX_RECEIVE_COUNT, so a few seconds of flush delay cost at least 30 s of retry delay, and a long one dead-lettered the task.Fix
AttemptTime(scheduled by v1.6.0 or earlier)Grace window: max(15 min, 3 ×
LOG_BATCH_THRESHOLD_SECONDS) since the failed attempt, how long a log write may lag before the retry stops waiting. A task whose attempt is never written still reaches the dead-letter queue.RequeueMessage, one Lua script: sets the visibility and decrements the receive count, only while the receipt still matches.scheduler.RetryLater(delay, err)from exec requeues the task through it.RetryLaterfor a missing attempt within the grace window.LOG_BATCH_THRESHOLD_SECONDS, so the usual flush lands before the retry runs; the requeue covers lag beyond that.Notes
RETRY_SCHEDULEsteps shorter thanLOG_BATCH_THRESHOLD_SECONDS(default 10 s) now wait that long. The default exponential schedule (30 s base) is unaffected.🤖 Generated with Claude Code