Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Complete
-
Affects Version/s: 2.0 GA, 2.1 RC1 (Hopper)
-
Fix Version/s: 2.1 RC1 (Hopper)
-
Component/s: None
-
Labels:None
Description
Optimistic Locking doesn't appear to be working any longer when using the repository "save" method to save an entity. This was previously working in the 1.4 release.
Steps to reproduce:
-Create a Document class with the @Version annotation
-Create a CrudRepository referencing the Document class
-Load an existing document via the repository "findOne" method in thread 1 (validated the cas is set in this document)
-In thread 2 update the same document
-In thread 1, save the document using the repository "save" method
Expected Result:
A CASMismatchException is thrown
Actual Result:
No exception is thrown and thread 1 overwrites the document thread 2 had saved
Note: this exact scenario was working in 1.4 release
Attachments
Issue Links
- is depended on by
-
DATACOUCH-224 Improve concurrent save/insert optimistic locking
-
- Closed
-