Skip to content

fix(dlq): skip requests owned by another live batch when failing a batch - #998

Open
burgulvedant wants to merge 1 commit into
uber:mainfrom
burgulvedant:fix/dlq-batch-fanout-owned-requests-826
Open

burgulvedant wants to merge 1 commit into
uber:mainfrom
burgulvedant:fix/dlq-batch-fanout-owned-requests-826

Conversation

@burgulvedant

Copy link
Copy Markdown

Why?

When a lost ack leaves two batch attempts for one request, the one that dead letters can fail a request that the other, still live, batch carries. That batch can go on to land the change, so the request is reported as error for a change that merges.

What?

failBatch now calls owningBatch for each member request and skips any request that a different live batch owns. owningBatch takes an optional batch to exclude, so the batch being reconciled does not count as its own members' owner. The request controller passes an empty value and behaves as before.

Test Plan

New unit tests cover a request carried by another live batch (created, speculating, landing, cancelling), and a request that is still failed when no other live batch carries it (no other batch, or the other batch failed, succeeded or cancelled). Existing fan out tests gained a mock for the request batch store. Run with go test ./submitqueue/orchestrator/controller/dlq/... or make test.

Issue

Closes #826

The DLQ reconciler for batch stages failed every member request of a
dead lettered batch, including a request that a different live batch had
already enrolled. That batch can go on to land the change, leaving the
request reported as error for a change that merges.

Reuse owningBatch when failBatch walks the member requests, excluding the
batch being reconciled so it does not count as its own members' owner.

Closes uber#826

This branch has not been deployed

No deployments
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.

Batch-scoped DLQ reconciler fails requests that another live batch owns

1 participant