On Wed, Apr 13, 2011 at 09:53:27AM -0400, Pavel Ivanov scratched on the wall: > > The fact that one engineer installed a site, began operating the app, > > then saw it become corrupt minutes later rules out power loss or hard > > resets in at least that case. An operating system level problem should > > have been noticed by now given it's Windows XP... And the file is > > locally held too. > > I don't know how Window's disk cache works but theoretically when you > set synchronous to OFF (0) OS can write database pages to disk in any > order it likes, disregarding the order SQLite requires. So while one > process writes those pages, another process can read those pages and > because of random writing order second process can read inconsistent > data, meaning it sees corrupted database.
That may be, but I can't see that being a problem: 1) The pages hit the OS file cache, and are going to be pulled back out of the cache. The pages will show up in the OS file cache in the order they are "written." 2) Turning synchronous off does not turn locking off. Even if the page order was changed, other SQLite processes can't touch the file until the first process finishes writing and unlocks the database. At that point, all the pages should be in the file cache. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users