Dennis Brakhane wrote:
On 3/9/06, John Stanton <[EMAIL PROTECTED]> wrote:
If two processes want to submit a
transaction, one must basically wait until the other finishes.
The problem with this is that the other process cannot finish. (See my
previous post)
Maybe I should file a bug report, shouldn't I?
A short summary: Process A starts transaction, Process B starts one
too after a while.
Now, B will get a "database locked" error, so it waits. A however
cannot commit the transaction (it can insert, however), so the lock
will never be freed.
You missed the point of my analysis, which is that one process has to
yield - wait until the winner completes then relaunch. This is not a
bug, it is a consequence of using a single file and having the Sqlite
executable linked into the application, not running on a discrete
server. It relies on using file locks to sync multiple users.
In your case process B has to bail out and start again. If you use some
form of synchronization, like a semaphore, the contention can never
happen because Process B is waiting on the semaphore and does not start
executing SQL until Process A signals.