1 Reply Latest reply on Feb 16, 2012 8:01 AM by Sudheer Krishna

    How do I know the cache updates are waiting for lock to be released ?

    Sudheer Krishna Novice

      Hi,

       

      I am running my performance runs and see that the cache commits are taking quite soem time. I think this could be because of soem locking issues. how exactly do i know that which thread is waiting for a lock ?

       

      i tried to run a local test case , buy putting a sleep and created a similar case. I can see logger statements which say the  (have enabled org.infinispan logging to trace)

       

       

      2410: 2012-02-16 11:32:27,347 [Thread-1] TRACE org.infinispan.util.concurrent.locks.LockManagerImpl.tracef:1800 orderCache - Attempting to lock 41 with acquisition timeout of 10000 millis

      2411: 2012-02-16 11:32:27,348 [Thread-1] TRACE org.infinispan.util.concurrent.locks.LockManagerImpl.tracef:1815 orderCache - Successfully acquired lock 41!

      [There is a 5 second wait here ]

      2905: 2012-02-16 11:32:32,412 [Atomikos:9] TRACE org.infinispan.interceptors.LockingInterceptor.tracef:1800 orderCache - Releasing lock on [41] for owner GlobalTransaction:<TSSEDEV5-9524>:170:local

       

      2925: 2012-02-16 11:32:32,418 [Thread-2] TRACE org.infinispan.util.concurrent.locks.LockManagerImpl.tracef:1800 orderCache - Attempting to lock 41 with acquisition timeout of 10000 millis (i was expecting this line before 5 seconds)

      2926: 2012-02-16 11:32:32,420 [Thread-2] TRACE org.infinispan.util.concurrent.locks.LockManagerImpl.tracef:1815 orderCache - Successfully acquired lock 41!

       

       

      Now the thread 2 , is actually waiting for Thread 1 to release teh lock for 5 seconds. But i dont see any logger related to that ?  (Atleast i was expecting the statement attempting to lock 5 seconds before).

       

      This will help me debug any locking issues in my stress environment.