2 ms·
Instead of giving you a mutual exclusion error, a newly created file written this way might simply be invisible until it's complete, at which point it atomicall
by kragen 5y ago
Instead of giving you a mutual exclusion error, a newly created file written this way might simply be invisible until it's complete, at which point it atomically replaces the old version of the file (which might still be accessible through mechanisms like VMS version numbers, WAFL snapshots, Linux reflinks, or simply having opened it before the replacement). This is probably what a transactional filesystem would give you: the creation, filling, and naming of the file would normally be part of the same transaction.
But, with optimistic synchronization, transactions that were reading an old version of the file might require redoing from the start when a new version was written.