| ▲ | jeffbee 7 hours ago | |||||||||||||||||||||||||
I wonder why the author left out atomic writes with O_APPEND. | ||||||||||||||||||||||||||
| ▲ | ozgrakkurt 7 hours ago | parent | next [-] | |||||||||||||||||||||||||
This requires O_SYNC and O_DIRECT afaik. Even then it is only some file systems that guarantee it and even then file size updating isn’t atomic afaik. Not so sure about file size update being atomic in this case but fairly sure about the rest. Matklad had some writing or video about this. Also there is a tool called ALICE and authors of that tool have a white paper about this subject. Also there was a blog post about how badger database fixed some issues around this problem. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
| ▲ | zbentley 7 hours ago | parent | prev [-] | |||||||||||||||||||||||||
Unsure. Aren’t there filesystems which make O_APPEND less durable than it’s specified to be, which might be interpreted to adversely affect atomicity? Could that be it? | ||||||||||||||||||||||||||