> > In my low-concurrency, familly-business context, I have no problem at
> > all setting 3 hours timeout using the built-in function, when the
> > slowest transaction may only take less than 5 minutes.
>
>With this condition as a 4th one in your list and with 5th one stating
>that you have less than 30 slowest transactions in 3 hours you have a
>very low possibility of having SQLITE_BUSY in the application. It
>still is not 0 (your computer could be heavy loaded with something
>else, memory consumed almost to the limit and swap is slowing down
>everything significantly) but it should be too low to think about.
>
>You need additional conditions about concurrency because SQLite
>doesn't guarantee fairness executing concurrent transactions with busy
>handler involved. In the message linked by Michael poster clearly says
>that he observed some transactions starting to wait early and finally
>executed later than other transactions which started to wait much
>later. So you have to think what is the worst case when some
>transaction started to wait and another transactions are keep coming
>and coming and finally 3 hours are gone but there was no chance for
>the first transaction to obtain necessary lock. Think about
>possibility of such "luck" and whether you're comfortable in ignoring
>it.

You're right pointing out boldly that such chaining of "new" 
transactions can keep an older one from executing in the alloted time 
frame.

I didn't mention that explicitely as I'm really in utterly low 
concurrency context and that condition would require an army of familly 
monkeys typing to have the slightliest odd of occurring.  But it 
shouldn't be completely ignored in the general case.

Perhaps SQLite should have a no-nonsense approach to this issue and 
introduce some determinism, even in a primitive way.  I find it worst 
than unfair, as the waiting process can do absolutely nothing against 
the situation where it is "ignored".

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to