Skip to content

feat(storage): add request batch assignments - #452

Closed
ubettigole wants to merge 1 commit into
mainfrom
abettigole/batch_assignment_store
Closed

feat(storage): add request batch assignments#452
ubettigole wants to merge 1 commit into
mainfrom
abettigole/batch_assignment_store

Conversation

@ubettigole

@ubettigole ubettigole commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Batch creation does not currently persist which batch owns a request. If processing fails after claiming the request or partially persisting a batch, redelivery can create a new batch ID, leaving duplicate or orphaned batches and stale dependency-graph entries.

This foundational PR adds an immutable request-to-batch assignment store and its MySQL implementation. Later PRs use this mapping to resume the original batch and allow cancellation to resolve durable batch ownership. This PR does not change controller behavior itself.

Test Plan

Unit tests

Issues

#354

Stack

  1. @ feat(storage): add request batch assignments #452
  2. feat(orchestrator): support creating batches #453
  3. fix(cancel): resolve durable batch ownership #454
  4. feat(batch): gate publication on batch readiness #455

Add an immutable request-to-batch mapping store and wire its MySQL implementation into the storage extension.

Jira Issues: CODEM-304

@sbalabanov sbalabanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is by design. When batching failed, a batch with new id is created and pipeline restarted. Batch dependent store should be tolerant to races (non-existing batch ids).
submitqueue/orchestrator/controller/batch/batch.go has an explanation starting line 200.
Could use a better model to validate if these assumptions still hold true.

@ubettigole

Copy link
Copy Markdown
Contributor Author

This immutable request-to-batch assignment approach is no longer part of the revised stack. The replacement stack preserves fresh batch IDs on retry and starts at #453.

@ubettigole ubettigole closed this Jul 31, 2026
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.

2 participants