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

isMemberOf searches are inefficient

    Details

    • Support Ticket IDs:

      Description

      An search of the form "(ismemberof=group-1)" is taking 10 seconds. jstacks show it waiting for a StaticGroup.reloadIfNeeded() for 2 seconds, and then 8 seconds are spent inside StaticGroup.isMember(DN userDN, Set<DN> examinedGroups):

      	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.processOR(SearchFilter.java:2460)
      	at org.opends.server.types.SearchFilter.matchesEntryInternal(SearchFilter.java:2256)
      	at org.opends.server.types.SearchFilter.processAND(SearchFilter.java:2351)
      	at org.opends.server.types.SearchFilter.matchesEntryInternal(SearchFilter.java:2253)
      	at org.opends.server.types.SearchFilter.matchesEntry(SearchFilter.java:2209)
      	at org.opends.server.backends.pluggable.EntryContainer.searchNotIndexed(EntryContainer.java:1209)
      	at org.opends.server.backends.pluggable.EntryContainer.access$1700(EntryContainer.java:123)
      	at org.opends.server.backends.pluggable.EntryContainer$3.run(EntryContainer.java:941)
      	at org.opends.server.backends.pluggable.EntryContainer$3.run(EntryContainer.java:702)
      	at org.opends.server.backends.jeb.JEStorage.read(JEStorage.java:769)
      	at org.opends.server.backends.pluggable.TracedStorage.read(TracedStorage.java:506)
      	at org.opends.server.backends.pluggable.EntryContainer.search(EntryContainer.java:701)
      	at org.opends.server.backends.pluggable.BackendImpl.search(BackendImpl.java:592)
      	at org.opends.server.workflowelement.localbackend.LocalBackendSearchOperation.processSearch(LocalBackendSearchOperation.java:234)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nicolas.capponi@forgerock.com Nicolas Capponi
                Reporter:
                cjr Chris Ridd
                Dev Assignee:
                Nicolas Capponi
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: