[hibernate-dev] Added UpgradeLockTest for HHH-5222 and changed LockMode.OPTIMISTIC + LockMode.OPTIMISTIC_FORCE_INCREMENT

Scott Marlow smarlow at redhat.com
Wed Nov 23 17:46:59 EST 2011

As part of a fix for HHH-5222, I changed LockMode.OPTIMISTIC  + 
LockMode.OPTIMISTIC_FORCE_INCREMENT to be higher values than 
LockMode.READ.  This helps the case where the user starts with a READ 
lock and later upgrades to LockMode.OPTIMISTIC_FORCE_INCREMENT.

Previously, we would of only handled an upgrade from LockMode.OPTIMISTIC 

This test passes with mysql51 and postgresql84 matrix profiles.  If it 
fails for other databases, we either need more locking primitives in 
that databases dialect or the database needs more features (we should 
exclude that dialect from the test).


More information about the hibernate-dev mailing list