fix(queue): make Redis delivery crash-recoverable#89
Closed
abnegate wants to merge 5 commits into
Closed
Conversation
Member
Author
|
@greptile review |
Contributor
Greptile SummaryMakes Redis queue delivery crash-recoverable.
Confidence Score: 5/5The PR appears safe to merge because no additional blocking failure eligible for this follow-up review was identified. No blocking failure remains within the scope of the previous review threads. Important Files Changed
Reviews (4): Last reviewed commit: "fix(queue): make legacy retries idempote..." | Re-trigger Greptile |
Member
Author
|
@greptile review |
Member
Author
|
@greptile review |
Member
Author
|
@greptile review |
Member
Author
|
Closing as campaign scope cleanup. Crash-recoverable queue delivery primitives are broad shared infrastructure, not a narrowly evidenced dedicated-database fix. Nothing from this draft was merged or released. A future Queue proposal needs its own independently approved scope and consumers. |
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.
What changed
Enqueued/Existingacknowledgements, and a typed conflict for mismatched reuseWhy
The previous Redis receive path removed an envelope from the pending list before storing its job and processing records. A worker or connection failure in that gap could strand the message. Producers also could not safely retry a publish after losing its response because the broker generated a new ID for every enqueue.
enqueueOnce()now lets a producer retry the same canonical envelope safely. Atomic claims remove the pending-to-processing loss window. Visibility reclaim remains disabled by default for compatibility and is enabled only when the caller chooses a processing deadline; long-running workers can renew that lease explicitly.Validation
bin/monorepo validateXDEBUG_MODE=off bin/monorepo check queueXDEBUG_MODE=off bin/monorepo test queue— 35 unit tests / 98 assertions; 33 e2e tests / 169 assertionspackages/queue/README.mdLinear: DAT-1993