apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Re: Transaction modes, explicit rollbacks etc.
Date Thu, 21 Dec 2006 22:39:37 GMT
Quoting Bojan Smojver <bojan@rexursive.com>:

> Maybe we should introduce APR_DBD_TRANSACTION_IMMEDIATE/EXCLUSIVE modes
> to tell SQLite3 what we really want? This would have no effect on other
> drivers, of course.

Actually, after reading SQLite3 documentation a bit more, probably the  
best thing to do is to just BEGIN IMMEDIATE (most people want to  
update the database when using transactions). This may lead to writer  
starvation in extreme concurrency situations, but at least it avoids  
the deadlocks.

We can then handle failures by having a wait loop inside  
transaction_start(), just like we do with select/query.

If nobody objects to this in the next few days, I'm going to commit  
changes to this effect.


View raw message