Hi,

I just spent two days tracking down a race condition that ended up being 
caused by a H2 "feature".

It seems that when one thread invokes Connection.setTransactionIsolation() 
it affects all other connections. It turns out that invoking this method 
invokes "SET LOCK_MODE" under the hood and according 
to http://www.h2database.com/html/grammar.html#set_lock_mode "This setting 
affects all connections."

Thomas and Noel, I believe this behavior violates the JDBC specification 
(which states the method affects the current connection, no mention of the 
entire database)... but even if it does not, it causes me major grief. Most 
methods of my application require READ_COMMITTED but update operations 
require REPEATABLE_READ and insert operations require SERIALIZABLE. This 
behavior forces me to upgrade all connections to SERIALIZABLE which makes 
the service unusable in production.

Seeing as you are working on MVCC, is this something you could fix in the 
near future?

Thanks,
Gili

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to