Flush does not mean durable storage
Flushing a writer transfers data to the underlying stream but does not guarantee disk persistence. Use FileChannel.force when durability is part of the requirement.
- @imsa-mehta▲ 3
Clear note on java / io. "Flush does not mean durable storage" is the kind of detail that is easy to overlook.
Clear note on java / io. "Flush does not mean durable storage" is the kind of detail that is easy to overlook.
Enlightening
Brilliant
- @saltysamm▲ 1
Good to see "Flush does not mean durable storage" written down. Handy reference for anyone working with java / io.
- @sohumm15▲ 1
Clear note on java / io. "Flush does not mean durable storage" is the kind of detail that is easy to overlook.
- @hk3narwhal▲ 1
FileOutputStream.getFD().sync()is the other way to force the OS to write to the device, alongsideFileChannel.force. If you have hit a variant of this, share it below. - @sohmeh▲ 1
Appreciate the write-up on "Flush does not mean durable storage". Useful for anyone using java / io.
- @dearsohum▲ 1
"Flush does not mean durable storage" is a useful thing to know about with java / io. Thanks for sharing it.
- @aarya-mehta▲ 1
Clear note on java / io. "Flush does not mean durable storage" is the kind of detail that is easy to overlook.
"Flush does not mean durable storage" is a useful thing to know about with java / io. Thanks for sharing it.
- @ohmshawas23▲ 1
Detailed
Fixed