in reply to NFS File Locking
If you unlink after opening but before before processing that would reduce the race window. On a local filesystem that fully removes the file from the directory listing, but as I understand it, over NFS it does a rename to ".nfsXXXX" rather than an unlink. Other processes would ignore such file names. If it were me, I'd experiment with manually doing the rename just to make sure I was certain about the rename pattern. You may also need to periodically clean up or process old .nfsXXX files in case something crashes during processing.
Update: ... or just flat-out rename before opening (to .processingXXXX-ORIGINALNAME) using the rename as a lock operation?
Good Day,
Dean
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: NFS File Locking
by Corion (Patriarch) on Apr 09, 2026 at 11:57 UTC | |
|
Re^2: NFS File Locking
by jbw8387 (Novice) on Apr 09, 2026 at 21:50 UTC |