Hi Thomas

I'm wondering whether there are any plans in H2 to address Dario's concerns 
below. 
As an application developer, I need to have a model of the DB's isolation 
properties in my mind and cope with its short-comings. For example with 
REPEATABLE_READ, I know that 'lost updates' and possibly 'phantom reads' 
are an issue that must be addressed by means of explicit locking mechanisms.

As far as I understand, LOCK_MODEs and transaction isolation in H2 is not 
the same concept. Please correct me if I'm wrong. I don't understand what 
Lock-Mode 2 means. What kind of guarantees does it give? What anomalies do 
I have to cope with as a developer? I'd greatly appreciate if you could 
elaborate more on lock-modes and transaction isolation in the 
documentation. Also a table showing lock-modes and possible anomalies would 
be great (as shown at the end of 
http://en.wikipedia.org/wiki/Isolation_%28database_systems%29).

Thanks
Remo



On Friday, August 20, 2010 3:14:30 PM UTC+2, dariof wrote:
>
>  Hi Thomas,
> I'm somewhat confused by how you both refer to TRANSACTION_ISOLATION_LEVEL 
> and LOCK_MODE as if there were the same thing. Even the documentation 
> makes a parallel between the two when might be different things.
>
> Lock mode is a resort to achieve a transaction isolation level but not 
> sufficient nor the only one. Often are used other means of containment at 
> the engine level besides lock policies to achieve an specific isolation 
> level.
> I think that LOCK_MODE (as any other resorts used) would be adjusted 
> automatically as consequence of and isolation level setting.
> This confusion make that there are a SET LOCK_MODE in place of a SET 
> ISOLATION LEVEL as usual in most databases. This is confuse and 
> unfortunate. 
> For example, locking policy can/need be changed in regard of MVCC setting, 
> but this don't mean that the user want to change their transaction 
> isolation level.
>
> In particular, H2's LOCK_MODE=0 effects are very different to UNCOMMITED 
> READ isolation level. Uncommited read purpose is that this connection as 
> "reader" can see un-commited transaction's effects of other writters and of 
> course without blocking.
>
> Please let us know you thoughts and roadmap about this matter.
>
> Regards,
> Dario. 
>  
>  
> El 18/08/10 14:35, Thomas Mueller escribió: 
>
>  My question is this:
> If I connect with url jdbc:h2:test;LOCK_MODE=0
> does it also affect other connections (and transactions) or only the one
> connection that set the mode
> in it's url?
>
>  This is documented: "This setting affects all connections."
>
>  
> 

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to