Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-2709

Reduce lock contention in SubentryManager and AuthenticatedUsers for modify/delete requests

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.2
    • Fix Version/s: 4.0.0, 3.5.0
    • Component/s: common-repo, core server
    • Labels:
      None
    • Sprint:
      OpenDJ Sprint 78

      Description

      While testing an in-memory backend prototype I observed significant contention in the SubentryManager. We have also seen this behavior less frequently against the JE / PDB backends:

      "Worker Thread 17" prio=10 tid=0x00007f277ce6c800 nid=0x4c66 runnable [0x00007f276a7e6000]
         java.lang.Thread.State: WAITING (parking)
      	at sun.misc.Unsafe.park(Native Method)
      	- parking to wait for  <0x00000007420ab550> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync)
      	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:964)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1282)
      	at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(ReentrantReadWriteLock.java:731)
      	at org.opends.server.core.SubentryManager.getSubentries(SubentryManager.java:519)
      	at org.opends.server.api.AuthenticationPolicy.forUser(AuthenticationPolicy.java:170)
      	at org.opends.server.workflowelement.localbackend.LocalBackendAddOperation.handlePasswordPolicy(LocalBackendAddOperation.java:957)
      	at org.opends.server.workflowelement.localbackend.LocalBackendAddOperation.processLocalAdd(LocalBackendAddOperation.java:452)
      	at org.opends.server.workflowelement.localbackend.LocalBackendWorkflowElement.execute(LocalBackendWorkflowElement.java:550)
      	at org.opends.server.core.WorkflowImpl.execute(WorkflowImpl.java:197)
      	at org.opends.server.core.WorkflowTopologyNode.execute(WorkflowTopologyNode.java:100)
      	at org.opends.server.core.AddOperationBasis.run(AddOperationBasis.java:764)
      	at org.opends.server.extensions.TraditionalWorkerThread.run(TraditionalWorkerThread.java:167)
      
      "Worker Thread 1" prio=10 tid=0x00007f277ce24000 nid=0x4c56 runnable [0x00007f276b7f6000]
         java.lang.Thread.State: RUNNABLE
      	at sun.misc.Unsafe.unpark(Native Method)
      	at java.util.concurrent.locks.LockSupport.unpark(LockSupport.java:152)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.unparkSuccessor(AbstractQueuedSynchronizer.java:662)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.doReleaseShared(AbstractQueuedSynchronizer.java:689)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.setHeadAndPropagate(AbstractQueuedSynchronizer.java:729)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:956)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1282)
      	at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(ReentrantReadWriteLock.java:731)
      	at org.opends.server.core.SubentryManager.doPreOperation(SubentryManager.java:981)
      	at org.opends.server.core.PluginConfigManager.invokePreOperationDeletePlugins(PluginConfigManager.java:2922)
      	at org.opends.server.workflowelement.localbackend.LocalBackendDeleteOperation.processLocalDelete(LocalBackendDeleteOperation.java:279)
      	at org.opends.server.workflowelement.localbackend.LocalBackendWorkflowElement.execute(LocalBackendWorkflowElement.java:556)
      	at org.opends.server.core.WorkflowImpl.execute(WorkflowImpl.java:197)
      	at org.opends.server.core.WorkflowTopologyNode.execute(WorkflowTopologyNode.java:100)
      	at org.opends.server.core.DeleteOperationBasis.run(DeleteOperationBasis.java:417)
      	at org.opends.server.extensions.TraditionalWorkerThread.run(TraditionalWorkerThread.java:167)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                matthew Matthew Swift
                Reporter:
                matthew Matthew Swift
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: