[Hypercontent-users] Important patch for all HyperContent 2.x deployers
Brought to you by:
alexvigdor
From: Alex V. <al...@bi...> - 2006-11-02 13:38:27
|
Hi everybody, Recently I've been running HyperContent more in JDK 1.5, and I've noticed very occasional hangs, which of course are very difficult to reproduce. I was fortunate to reproduce it while I had the debugger on the other day, so I was able to quickly identify the cause. I'm not certain whether this bug actually affects 1.4 JVMs or not, but the fix should be safe for any JVM level. The cause was that a literal String was being used for synchronization in a heavily used class; the JDK was interning that string so that multiple instances of the class were sharing the same lock, when they should each have had there own, and in certain circumstances this would lead to a deadlock. This should also have had a negative impact on scalability, since it would prevent multiple transactional IO operations from happening concurrently. This bug has been present since April 6, 2005! The class in question is org.hypercontent.data.impl.AbstractDataStore, and the fix involved changing protected final Object storeLock="AbstractDataStore.storeLock"; to protected final Object storeLock=new Object(); The fix has been checked into CVS. -Alex |