▲ | layer8 4 days ago | ||||||||||||||||||||||||||||||||||
Durability also requires the file system implementation and the disk to do the right thing on fsync, which, if I recall past discussions correctly, isn’t a given. | |||||||||||||||||||||||||||||||||||
▲ | ericbarrett 4 days ago | parent | next [-] | ||||||||||||||||||||||||||||||||||
There are some older fsync() bugs (as famously explored by Postgres developers: https://wiki.postgresql.org/wiki/Fsync_Errors ) but I'm not aware of any modern mainstream kernel where this is broken. If I'm wrong, please tell me! An application that really wants confidence in a write—to the extent that the underlying device and drivers allow—should use O_DIRECT. Or maybe there is a modern equivalent with io-uring. But that is not easy engineering :) | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
▲ | eatonphil 4 days ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||
Take a look at Alex Miller's diagrams for what function calls are actually doing on various systems. |