You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Batch-scoped DLQ reconciler fails requests that another live batch owns #826
The batch-scoped DLQ reconciler fails requests that another live batch owns. That batch may go on to merge the change, which leaves the request reported error for a change that lands.
How it is reached
A lost ack on the batch topic leaves two batch attempts for one request. If the redundant attempt's dependency-analysis message exhausts its retries (for example, a storage error while resolving dependencies), it dead-letters while still in creating. failBatch then moves it to failed and fans out over batch.Contains, terminating a request that reads batched and belongs to the first, healthy batch. TerminateRequest declines only when the request is already terminal, and batched is not terminal.
The guard to mirror
owningBatch in dlq/request.go already answers "which batch owns this request" for the request-scoped reconciler. The batch-scoped fan-out needs the inverse: skip a request when some other non-terminal batch owns it. The guard must exclude the batch being reconciled, or the batch counts as its own members' owner and the fan-out never happens.
Found in review of #590. As of 6c050082 the fan-out in failBatch has no ownership guard.
It reuses owningBatch in the failBatch loop over member requests, excluding the batch being reconciled, so a request that another live batch carries is no longer failed. It adds unit tests for both cases. Happy to adjust anything.
Activity
burgulvedant commentedon Oct 31, 2026
I have opened a PR for this: #998
It reuses owningBatch in the failBatch loop over member requests, excluding the batch being reconciled, so a request that another live batch carries is no longer failed. It adds unit tests for both cases. Happy to adjust anything.