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

subtreeSpecification filters using isMemberOf are inefficient

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 4.0.0
    • Fix Version/s: 3.5.0, 4.0.0
    • Component/s: backends
    • Labels:

      Description

      I have a single collective attribute subentry with this:

      subtreeSpecification: { specificationFilter "(isMemberOf=cn=active,ou=Groups,dc=example,dc=com)" }
      

      This results in very slow operations, with the worker thread stuck inside getValues() for most of the time. Note this is a Bind:

      "Worker Thread 7" prio=10 tid=0x00007f114086e000 nid=0xa6c runnable [0x00007f112f9f7000]
         java.lang.Thread.State: RUNNABLE
      	at org.forgerock.opendj.ldap.schema.SchemaUtils.normalizeStringAttributeValue(SchemaUtils.java:727)
      	at org.forgerock.opendj.ldap.schema.CaseIgnoreEqualityMatchingRuleImpl.normalizeAttributeValue(CaseIgnoreEqualityMatchingRuleImpl.java:47)
      	at org.forgerock.opendj.ldap.schema.MatchingRule.normalizeAttributeValue(MatchingRule.java:474)
      	at org.forgerock.opendj.ldap.AVA.getEqualityNormalizedValue(AVA.java:756)
      	at org.forgerock.opendj.ldap.AVA.toNormalizedByteString(AVA.java:807)
      	at org.forgerock.opendj.ldap.RDN.toNormalizedByteString(RDN.java:435)
      	at org.forgerock.opendj.ldap.DN.toNormalizedByteString(DN.java:906)
      	at org.forgerock.opendj.ldap.DN$CompactDn.getNormalizedValue(DN.java:1019)
      	at org.forgerock.opendj.ldap.DN$CompactDn.hashCode(DN.java:995)
      	at java.util.HashMap.hash(HashMap.java:362)
      	at java.util.HashMap.getEntry(HashMap.java:462)
      	at java.util.HashMap.containsKey(HashMap.java:449)
      	at java.util.HashSet.contains(HashSet.java:201)
      	at org.opends.server.extensions.StaticGroup.isMember(StaticGroup.java:386)
      	at org.opends.server.extensions.StaticGroup.isMember(StaticGroup.java:413)
      	at org.opends.server.api.Group.isMember(Group.java:356)
      	at org.opends.server.extensions.IsMemberOfVirtualAttributeProvider.getValues(IsMemberOfVirtualAttributeProvider.java:84)
      	at org.opends.server.api.VirtualAttributeProvider.matchesEqualityAssertion(VirtualAttributeProvider.java:211)
      	at org.opends.server.types.VirtualAttribute.matchesEqualityAssertion(VirtualAttribute.java:108)
      	at org.opends.server.types.SearchFilter.processEquality(SearchFilter.java:2674)
      	at org.opends.server.types.SearchFilter.matchesEntryInternal(SearchFilter.java:2262)
      	at org.opends.server.types.SearchFilter.matchesEntry(SearchFilter.java:2209)
      	at org.opends.server.types.SubtreeSpecification$FilterRefinement.matches(SubtreeSpecification.java:228)
      	at org.opends.server.types.SubtreeSpecification.isWithinScope(SubtreeSpecification.java:1523)
      	at org.opends.server.core.SubentryManager.getCollectiveSubentries(SubentryManager.java:593)
      	at org.opends.server.types.Entry.processCollectiveAttributes(Entry.java:2964)
      	at org.opends.server.types.Entry.processVirtualAttributes(Entry.java:3226)
      	at org.opends.server.backends.pluggable.ID2Entry.get0(ID2Entry.java:425)
      	at org.opends.server.backends.pluggable.ID2Entry.get(ID2Entry.java:388)
      	at org.opends.server.backends.pluggable.EntryContainer.getEntry0(EntryContainer.java:1883)
      	at org.opends.server.backends.pluggable.EntryContainer.access$2200(EntryContainer.java:123)
      	at org.opends.server.backends.pluggable.EntryContainer$8.run(EntryContainer.java:1847)
      	at org.opends.server.backends.pluggable.EntryContainer$8.run(EntryContainer.java:1843)
      	at org.opends.server.backends.pdb.PDBStorage.read(PDBStorage.java:873)
      	at org.opends.server.backends.pluggable.TracedStorage.read(TracedStorage.java:506)
      	at org.opends.server.backends.pluggable.EntryContainer.getEntry(EntryContainer.java:1842)
      	at org.opends.server.backends.pluggable.BackendImpl.getEntry(BackendImpl.java:468)
      	at org.opends.server.workflowelement.localbackend.LocalBackendBindOperation.processSimpleBind(LocalBackendBindOperation.java:386)
      	at org.opends.server.workflowelement.localbackend.LocalBackendBindOperation.processBind(LocalBackendBindOperation.java:289)
      	at org.opends.server.workflowelement.localbackend.LocalBackendBindOperation.processLocalBind(LocalBackendBindOperation.java:166)
      	at org.opends.server.workflowelement.localbackend.LocalBackendWorkflowElement.execute(LocalBackendWorkflowElement.java:729)
      	at org.opends.server.workflowelement.localbackend.LocalBackendWorkflowElement.executeOnNonRootDSE(LocalBackendWorkflowElement.java:1024)
      	at org.opends.server.workflowelement.localbackend.LocalBackendWorkflowElement.execute(LocalBackendWorkflowElement.java:895)
      	at org.opends.server.core.BindOperationBasis.run(BindOperationBasis.java:566)
      	at org.opends.server.extensions.TraditionalWorkerThread.run(TraditionalWorkerThread.java:158)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              matthew Matthew Swift
              Reporter:
              cjr Chris Ridd
              Dev Assignee:
              Matthew Swift Matthew Swift
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: