[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6296) Unnecessary lock in UpdateTimestampsCache

Alexandre Thiel (JIRA) noreply at atlassian.com
Tue Jun 7 11:11:24 EDT 2011


Unnecessary lock in UpdateTimestampsCache
-----------------------------------------

                 Key: HHH-6296
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6296
             Project: Hibernate Core
          Issue Type: Patch
          Components: caching (L2)
    Affects Versions: 3.6.4, 3.6.3, 3.6.2, 3.6.1
         Environment: Hibernate 3.6.4
            Reporter: Alexandre Thiel
            Priority: Minor
         Attachments: UpdateTimestampsCache.java.diff

Non transactional queries call UpdateTimestmapsCache.invalidate method with an empty array parameter but still acquire a WriteLock which cause a performance bottle neck under heavy load.

GNU-Diff Patch for org.hibernate.cache.UpdateTimestampsCache attached

Thread dump example :

"TP-Processor10" daemon prio=10 tid=0x00000000415cb800 nid=0x6803 waiting on condition [0x00007f1346594000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x00007f1370f6d1c0> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:747)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:778)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1114)
	at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:807)
	at org.hibernate.cache.UpdateTimestampsCache.invalidate(UpdateTimestampsCache.java:88)
	at org.hibernate.engine.ActionQueue$AfterTransactionCompletionProcessQueue.afterTransactionCompletion(ActionQueue.java:604)
	at org.hibernate.engine.ActionQueue.afterTransactionCompletion(ActionQueue.java:209)
	at org.hibernate.impl.SessionImpl.afterTransactionCompletion(SessionImpl.java:602)
	at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:292)
	at org.hibernate.impl.SessionImpl.afterOperation(SessionImpl.java:595)
	at org.hibernate.impl.SessionImpl.load(SessionImpl.java:993)
	at org.hibernate.impl.SessionImpl.load(SessionImpl.java:978)



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list