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

fsync write barrier for all client or server side writing of state to disk #41

Closed
david415 opened this issue Sep 12, 2022 · 1 comment
Closed

Comments

@david415
Copy link
Member

I'm looking at you authority client, catshadow and katzenpost/client.

@david415
Copy link
Member Author

a wise man once said """ideally it would call fsync before closing the file, but instead the best we can do is resort to either fsync FOR EACH WRITE or pull in some library that does proper file i/o

but seeing as this seems systemic in the code base we might benefit from doing the latter eventually, or writing our own set of abstractions for it

anyway - if you're writing files to disk for key rotations, you definitely want them to actually get written to the disk, so os.file.O_SYNC in the flags arg to WriteFile is the 5-second fix for that problem, and we can tackle it properly later

python's stdlib has the same stupid data-eating stdlib design, see Durability here https://blog.gocept.com/2013/07/15/reliable-file-updates-with-python/"""

@david415 david415 changed the title fsync write barrier for all client side writing of state to disk fsync write barrier for all client or server side writing of state to disk Sep 12, 2022
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

No branches or pull requests

1 participant