Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaceValidPath should use atomic RENAME_EXCHANGE on Linux #11655

Open
Mic92 opened this issue Oct 8, 2024 · 0 comments
Open

replaceValidPath should use atomic RENAME_EXCHANGE on Linux #11655

Mic92 opened this issue Oct 8, 2024 · 0 comments
Labels

Comments

@Mic92
Copy link
Member

Mic92 commented Oct 8, 2024

void replaceValidPath(const Path & storePath, const Path & tmpPath)
currently uses a temporary location as a way to recover from interrupts when replacing old store paths with new repaired ones.
However on Linux this can be made more atomic using renameat2() with the RENAME_EXCHANGE flag.
This should leave no time window where the store path does not exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant