Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Outdated
-
None
-
None
-
None
-
None
Description
The JackRabbit implementation of Node#refresh is not safe in concurrent (multi-threaded) scenarios.
The changes from other sessions are not merged atomically, but arrive as individual item-state updates. This causes temporary inconsistency in the state of the session. Node#refresh needs to verify the hierarchy of all items in the changelog and hence needs a consistent hierarchy.
Saving a session that failed it's refresh may cause inconsistencies. (setting the 'validate hierarchy' system property will block these, at the cost of some performance)
The workaround is to use Session#refresh. That call does not need to check the hierarchy and so is not affected.