-
Notifications
You must be signed in to change notification settings - Fork 579
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
Dump state file atomically not to corrupt it #9451
Conversation
TestStart
Awesome! If this doesn’t help... I don’t know. |
TODO
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, looks like some parts of Boost.Iostreams aren't header-only in particular file_descriptor
: https://www.boost.org/doc/libs/1_79_0/libs/iostreams/doc/installation.html
Sounds like a bit of extra fun then, but okay.
cbd8cb1
to
1349305
Compare
1349305
to
42edd2e
Compare
My compromise implementation: |
42edd2e
to
6b7f2b2
Compare
|
In this variant we keep the legacy broken and CreateTempFile() as-is. But we don’t depend on it in new code. |
f3e5d56
to
637d81a
Compare
001cbbb
to
9299b41
Compare
by using fsync(2) before close(2) and rename(2).
9299b41
to
c9d6eec
Compare
Dump state file atomically not to corrupt it
by using fsync(2) before close(2) and rename(2).
closes #9446