Skip to content

Write runsc state file atomically. - #16228

Merged
copybara-service[bot] merged 2 commits into
masterfrom
test/cl1005193739
Oct 23, 2026
Merged

copybara-service[bot] merged 2 commits into
masterfrom
test/cl1005193739

Conversation

@copybara-service

Copy link
Copy Markdown

Write runsc state file atomically.

Opening the file for write truncates it, so this prevents creating corrupt state file in case the process gets killed between opening and writing, or when hitting disk-full errors (which it gets on the write, not on the open).

FUTURE_COPYBARA_INTEGRATE_REVIEW=#16169 from EtiennePerot:statefile-atomic 9fa3d71

Opening the file for write truncates it, so this prevents creating
corrupt state file in case the process gets killed between opening
and writing, or when hitting disk-full errors (which it gets on the
write, not on the open).
@copybara-service copybara-service Bot added the exported Issue was exported automatically label Oct 23, 2026
@copybara-service
copybara-service Bot merged commit 1cd19ea into master Oct 23, 2026
1 of 3 checks passed
@copybara-service
copybara-service Bot deleted the test/cl1005193739 branch October 23, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants