Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2670

Internal repository locks are not released if user transactions are created and rolled back from different threads


    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 5.4.0.Final
    • 5.3.0.Final
    • Transactions

      When user transactions are used with a repository and some transactions are rolled back, if the rollback operation is performed from another thread (which is the case with Arjuna for example), then any locks that might have been obtained by previously successful session.save operations are never released.

      The reason is that internally ModeShape uses ReentrantLock to track locked node keys, so when a transaction is started and some session.save operations are performed on thread T1, node keys are locked for this thread. If a subsequent rollback happens from a separate thread - T2 - these node keys will not be released because T2 is not the owning thread.

            hchiorean Horia Chiorean (Inactive)
            hchiorean Horia Chiorean (Inactive)
            0 Vote for this issue
            1 Start watching this issue