Add locking module: optimistic vs pessimistic locking on Hibernate 7.4.14.Final
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YPgGH6aMbSLANL3E2HHmS6
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
start balance 100; transaction A deposits 10, transaction B deposits 20
|
||||
both read 100 before either writes; A commits first, then B
|
||||
final balance: 120 (a correct result would be 130)
|
||||
|
||||
update statements Hibernate sent:
|
||||
update Account set balance=?,owner=? where id=?
|
||||
update Account set balance=?,owner=? where id=?
|
||||
Reference in New Issue
Block a user