Hi, would someone explain me how row level locks are working in h2 in mvcc mode? W/o mvcc option h2 uses table locks, obviously in XXI century this isn't an option :). There are two controversial statements on h2 site regarding mvcc & row locks:
1. http://www.h2database.com/html/advanced.html#mvcc : "If multiple connections concurrently try to update the same row, this database fails fast: a concurrent update exception is thrown." 2. http://www.h2database.com/html/features.html#comparison : "Row Level Locking Yes *9 Yes No Yes Yes *9 H2 supports row level locks when using multi version concurrency." suppose two two concurrent transactions wants to lock an entity for further modification. with databases having row level locks but no SELECT FOR UPDATE syntax you can do this using UPDATE T SET ID = ID WHERE ID = <PARTICULAR ID> SELECT * FROM T WHERE ID = <PARTICULAR ID> statement. But in h2 (according to statement #1) second transaction would fail with concurrent modification exception is it a feature? bug? bug in docs? what is expected behavior? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
