Skip to content

Make restart reconciliation atomic#94

Merged
cstanislawski merged 1 commit into
mainfrom
fix/atomic-restart-reconciliation
Jul 14, 2026
Merged

Make restart reconciliation atomic#94
cstanislawski merged 1 commit into
mainfrom
fix/atomic-restart-reconciliation

Conversation

@cstanislawski

Copy link
Copy Markdown
Owner

No description provided.

@cstanislawski
cstanislawski force-pushed the fix/atomic-restart-reconciliation branch from b5c2256 to e09cafe Compare July 14, 2026 20:50
@cstanislawski

Copy link
Copy Markdown
Owner Author

A restart action and its acknowledgement need to be recorded atomically.

Previously, the controller updated the pod template first, then separately removed restart-at or advanced last-restart-timestamp. A crash, conflict, lost response, or leader transition between those writes left a completed rollout looking pending, so the next reconciliation could trigger it again.

This change writes both sides of the action in one patch: restartedAt plus removal of restart-at for one-time restarts, or restartedAt plus last-restart-timestamp for recurring restarts. Stale patches fail without changing the object, then reconciliation retries from the latest version.

The fix covers both one-time and recurring restarts. Regression tests simulate a committed patch with a lost response and a concurrent update conflict, proving that each restart window is applied at most once.

@cstanislawski cstanislawski self-assigned this Jul 14, 2026
@cstanislawski
cstanislawski marked this pull request as ready for review July 14, 2026 20:59
@cstanislawski
cstanislawski merged commit 8cce6ed into main Jul 14, 2026
3 checks passed
@cstanislawski
cstanislawski deleted the fix/atomic-restart-reconciliation branch July 14, 2026 20:59
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