Mrs. Brisby wrote:

Instead of keeping an "undo" journal- consider using a "changes" journal-- each writer could use it's own journal then only at commit would each worker actually start making changes to the database.

> ...
>
Note that these changes will contain not only the values they are
storing, but some kind of hash of the original value. This is used to
detect whether or not two processes will UPDATE the same value. To make
this simple, COMMIT should be allowed to fail (with no changes made).


It is more complicated than that. In order to maintain isolation (the "I" in "ACID") the second commit must fail if at any time during the transaction it read a value that was written by the first commit, or if the first commit read a value that was written by the second commit. Figuring out what the first commit has read or written is likely to be difficult since the first commit has already occurred and (presumably) its journal has already been deleted.

Very tricky to pull off without a server process to coordinate things.

--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to