Version on Create Concurrency

2 11 2010

In Jackrabbit 2.1.1 (possibly fixed in later version) if you create nodes with mix:versionable added to them, the version history will be created which will block other threads performing writes and Persistence manager level reads. If the persistence manager is a JDBC based persistence manager and other threads are attempting to find items that are not in the shared cache, reads will be also be blocked, as they need to access the database by reading. Remember the PM is a singled threaded transaction monitor in JR 2.1.1 and earlier. So creating an item with mix:versionable where many concurrent requests are performing the operation results in a thread trace as below (red == blocked threads).


Removing the mix:versionable, appears to remove almost all thread blocking as below. It may not look like it but in the case below there are more concurrent request running than in the example above, the time per request is significantly less.


So add mix:versionable only when you need to add it at the point of checkin.



%d bloggers like this: