From: Clifford Heath Date: 2008-09-26T14:09:50+09:00 Subject: Re: How to make Ruby _THE_ scripting language of choice, fold in SQLite ara.t.howard wrote: > On Sep 25, 2008, at 9:34 PM, David Masover wrote: >> First example: Filesystems. With ordered write mode, you can simply >> write to a temporary file, then rename said temporary file into place. >> With unordered writes, add an fsync between those two steps. > rename is not atomic on NFS, nor many other network filesystems. on > NFS you have only softlink and rmdir as atomic operations. Yes, the Walter Tichy method, first used (to my knowledge) by him in RCS. However, without the fsync, its still not transactional, as you can pull the power cord after the operation and there's no guarantee that the disk blocks that make up the file content are actually on disk. All the FS journalling does is to ensure that the block allocation tables and inodes are clean. Also I don't know the defined POSIX semantics now, but the system-wide "sync" call would return as soon as every dirty block was in the disk I/O queues, and before they were on disk. You had to call it twice before being sure, as the scan for dirty blocks couldn't complete until the queues were empty. (I don't believe fsync has this flaw). Nevertheless, though this method can solve the (D)urability problem of ACID, it offers no solution to A, C, or I, so is still not transactional. Neither is Amazon's approach, and neither is DVCS, despite their success in solving *different* problems. Clifford Heath.