0 Replies Latest reply on Apr 18, 2018 2:29 PM by Neelkamal-Oracle

    Question regarding com.sleepycat.je.LockTimeoutException

    Neelkamal-Oracle

      Hello,

       

      I am seeing the below exception some times when trying to read data from berkeley db.

       

      ' com.sleepycat.je.LockTimeoutException: (JE 6.4.25) Lock expired. Locker 1010742987 -1_LogDataPipelineThreadPool-thread-9_ThreadLocker: waited for lock on database=persist#Config LockAddr:675879129 LSN=0xc67/0x8c6947 type=READ grant=WAIT_NEW timeoutMillis=1000 startTime=1521797382134 endTime=1521797383134 Owners: [<LockInfo locker="1420058189 98951_ConfigXMLCacheRefresherThreadPool-thread-1_Txn" type="WRITE"/>] Waiters: [<LockInfo locker="1010742987 -1_LogDataPipelineThreadPool-thread-9_ThreadLocker" type="READ"/>] at com.sleepycat.je.txn.LockManager.newLockTimeoutException(LockManager.java:777) ~[je-6.4.25.jar:6.4.25] at com.sleepycat.je.txn.LockManager.makeTimeoutException(LockManager.java:629) ~[je-6.4.25.jar:6.4.25] at com.sleepycat.je.txn.LockManager.lockInternal(LockManager.java:439) ~[je-6.4.25.jar:6.4.25] at com.sleepycat.je.txn.LockManager.lock(LockManager.java:296) ~[je-6.4.25.jar:6.4.25] at com.sleepycat.je.txn.BasicLocker.lockInternal(BasicLocker.java:154) ~[je-6.4.25.jar:6.4.25] at com.sleepycat.je.txn.Locker.lock(Locker.java:504)

       

      All we are doing is reads and no writes are involved when this exception happens. Also, we don't have any explicit locks in our code.

       

      Does berkeley db implicitly acquire a lock before read ? In my case i have multiple threads trying to read the same resource asynchronously.

      Thanks,

      Neel