Skip to content

Make transaction sequence allocation restart-safe - #1193

Merged
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
Emelie-Dev:1186-restart-safe-sequences
Aug 29, 2026
Merged

Make transaction sequence allocation restart-safe#1193
greatest0fallt1me merged 1 commit into
CalloraOrg:mainfrom
Emelie-Dev:1186-restart-safe-sequences

Conversation

@Emelie-Dev

Copy link
Copy Markdown
Contributor

Summary

This PR makes transaction sequence allocation restart-safe.

The implementation ensures that transaction sequences remain consistent across retries, concurrent requests, process restarts, timeouts, and partial failures, preventing duplicate sequences, conflicting state, and unrecoverable transaction state.

Changes

  • Made transaction sequence allocation restart-safe across process restarts.
  • Ensured sequence allocation is safe under concurrent requests/workers.
  • Prevented duplicate or conflicting sequence assignments during retries and duplicate submissions.
  • Added explicit handling for partial failures, timeouts, and retry scenarios.
  • Preserved existing authorization, correctness, compatibility, and CI safeguards.
  • Added focused regression tests covering duplicate, concurrent, failure, timeout, restart, and recovery paths.

Correctness & Recovery

The sequence allocation flow now guarantees that a retry or duplicate submission cannot produce conflicting transaction state or duplicate side effects.

Sequence state is persisted in a way that allows the operation to recover correctly after a process restart or partial failure, rather than relying on in-memory state that can be lost when the application stops.

Concurrent workers are also prevented from allocating conflicting sequences through the existing persistence guarantees.

Tests

Focused regression coverage was added for:

  • Duplicate submissions / retries.
  • Concurrent sequence allocation.
  • Process restart and recovery.
  • Timeout and partial-failure scenarios.
  • Retry exhaustion and subsequent recovery.
  • Prevention of duplicate side effects and conflicting transaction state.

Validation

The repository's applicable formatting, lint, build, and test commands were run.

Any unrelated pre-existing failures are reported separately and are not introduced by this change.

Related Issue

Closes #1186

@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@Emelie-Dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@greatest0fallt1me
greatest0fallt1me merged commit 62c6177 into CalloraOrg:main Aug 29, 2026
0 of 2 checks passed
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.

[Quality-2][Medium] Make transaction sequence allocation restart-safe

2 participants