Hacker News new | past | comments | ask | show | jobs | submit login

NFS open file handle semantics are quite an annoyance.

The recommended way to perform atomic writes on POSIX is the create-write-fsync-rename-fsyncdir[0] dance. But that replaces the original file which causes ESTALE for all readers on NFS servers that don't support "delete on last close"[1] semantics.

This breaks common pattern where you can continue reading slightly stale data from unlinked files while writers updating the data atomically. In other words it makes it much harder to do filesystem concurrency correctly which already is hard enough.

A practical case where I'm seeing it is on Amazon's EFS. Updating thumbnails occasionally results in torn images because the server tries to send a stale file.

[0] https://danluu.com/file-consistency/ [1] http://nfs.sourceforge.net/#faq_d2




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: