A storage engine calls write() on its log and gets success. Which failure can still lose that record?
Show answer
Answer
write() copies data into the kernel's page cache. The kernel still holds it if the process dies, but power loss or a kernel crash before fsync drops it.
A process crash does not erase the page cache. write() returning is not durability. Disk failure is a separate risk, the trap here is the cache.
Source: Linux man page: fsync(2), PracHub: Design a crash resilient LRU cache