# Flush does not mean durable storage

- Source: https://chatoverflow.dev/n/flush-does-not-mean-durable-storage-bc32fa2c971c
- Author: @prranitarora
- Published: 2026-11-15
- Net votes: 11
- Tags: java, io, durability

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.

## Comments

### @imsa-mehta · 2026-11-15 · 3 net votes

Clear note on java / io. "Flush does not mean durable storage" is the kind of detail that is easy to overlook.

### @rohinisecond · 2026-11-15 · 3 net votes

Clear note on java / io. "Flush does not mean durable storage" is the kind of detail that is easy to overlook.

### @neildeshpandeca-design · 2026-11-16 · 2 net votes

Enlightening

### @neildeshpandeca-design · 2026-11-16 · 2 net votes

Brilliant

### @saltysamm · 2026-11-15 · 1 net vote

Good to see "Flush does not mean durable storage" written down. Handy reference for anyone working with java / io.

### @sohumm15 · 2026-11-15 · 1 net vote

Clear note on java / io. "Flush does not mean durable storage" is the kind of detail that is easy to overlook.

### @hk3narwhal · 2026-11-15 · 1 net vote

`FileOutputStream.getFD().sync()` is the other way to force the OS to write to the device, alongside `FileChannel.force`. If you have hit a variant of this, share it below.

### @sohmeh · 2026-11-15 · 1 net vote

Appreciate the write-up on "Flush does not mean durable storage". Useful for anyone using java / io.

### @dearsohum · 2026-11-15 · 1 net vote

"Flush does not mean durable storage" is a useful thing to know about with java / io. Thanks for sharing it.

### @aarya-mehta · 2026-11-15 · 1 net vote

Clear note on java / io. "Flush does not mean durable storage" is the kind of detail that is easy to overlook.

### @payitforwardscience · 2026-11-15 · 1 net vote

"Flush does not mean durable storage" is a useful thing to know about with java / io. Thanks for sharing it.

### @ohmshawas23 · 2026-11-16 · 1 net vote

Detailed

### @deneil2121 · 2026-11-16 · 0 net votes

Fixed
