Skip to content

fix(orchestrator): mint distinct message IDs for cancel re-publishes - #505

Open
behinddwalls wants to merge 1 commit into
preetam/speculation-buildsignal-pathsfrom
preetam/speculation-cancel-msgid
Open

fix(orchestrator): mint distinct message IDs for cancel re-publishes#505
behinddwalls wants to merge 1 commit into
preetam/speculation-buildsignal-pathsfrom
preetam/speculation-cancel-msgid

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Why?

The cancel controller published its speculate hand-off with the bare batch ID as the message ID. The queue deduplicates on (topic, partition key, message ID) against every row it has not garbage-collected yet, consumed ones included, so a redelivery's re-publish for the same batch was a silent no-op — leaving a batch stuck Cancelling with nothing driving it to terminal. Same class of bug as b1f5795 in stovepipe.

What?

publishBatchID now goes through submitqueue/core/publish: publish.UniqueID mints a distinct message ID per publish (and documents the dedup rule once), and publish.Message owns the registry-lookup plumbing the controller previously hand-rolled. The batch-path test now asserts the payload still carries the batch ID while the message ID is distinct per publish, and the multi-batch tests assert on the payload's batch ID for the same reason.

Test Plan

bazel test //submitqueue/orchestrator/controller/cancel/...

Issues

@behinddwalls
behinddwalls marked this pull request as ready for review August 4, 2026 01:53
@behinddwalls
behinddwalls requested review from a team and sbalabanov as code owners August 4, 2026 01:53
@behinddwalls
behinddwalls force-pushed the preetam/speculation-cancel-msgid branch from 733a5fd to f2e6633 Compare August 4, 2026 01:58
@behinddwalls
behinddwalls force-pushed the preetam/speculation-cancel-msgid branch from f2e6633 to dda3dd3 Compare August 4, 2026 05:11
@behinddwalls
behinddwalls force-pushed the preetam/speculation-cancel-msgid branch from dda3dd3 to 96feaf5 Compare August 5, 2026 03:15
@behinddwalls
behinddwalls force-pushed the preetam/speculation-cancel-msgid branch from 96feaf5 to d450509 Compare August 5, 2026 03:26
@behinddwalls
behinddwalls force-pushed the preetam/speculation-cancel-msgid branch from d450509 to 9227c40 Compare August 5, 2026 03:38
@behinddwalls
behinddwalls force-pushed the preetam/speculation-cancel-msgid branch from 9227c40 to dbd61ed Compare August 5, 2026 03:44
## Summary

### Why?

The cancel controller published its speculate hand-off with the bare batch ID as the message ID. The queue deduplicates on (topic, partition key, message ID) against every row it has not garbage-collected yet, consumed ones included, so a redelivery's re-publish for the same batch was a silent no-op — leaving a batch stuck Cancelling with nothing driving it to terminal. Same class of bug as b1f5795 in stovepipe.

### What?

`publishBatchID` now goes through `submitqueue/core/publish`: `publish.UniqueID` mints a distinct message ID per publish (and documents the dedup rule once), and `publish.Message` owns the registry-lookup plumbing the controller previously hand-rolled. The batch-path test now asserts the payload still carries the batch ID while the message ID is distinct per publish, and the multi-batch tests assert on the payload's batch ID for the same reason.

## Test Plan

✅ `bazel test //submitqueue/orchestrator/controller/cancel/...`
@behinddwalls
behinddwalls force-pushed the preetam/speculation-cancel-msgid branch from dbd61ed to baf15bf Compare August 5, 2026 04:11
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.

1 participant