Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1868348

Summary: MOD on a large static group takes too long if substring index is present.
Product: Red Hat Enterprise Linux 8 Reporter: Têko Mihinto <tmihinto>
Component: 389-ds-baseAssignee: LDAP Maintainers <ldap-maint>
Status: CLOSED WONTFIX QA Contact: RHDS QE <ds-qe-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 8.7CC: ldap-maint, mhofmann, mreynolds, mrhodes, pasik, pcech, spichugi, tbordaz, tscherf, vashirov
Target Milestone: rcKeywords: Triaged
Target Release: 8.9Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard: sync-to-jira
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-26 10:03:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Têko Mihinto 2020-08-12 11:17:15 UTC
Description of problem:

The IDL scan limit is set to the default value of 4000.
The MemberOf plugin and the Referential Integrity plugin are disabled.

If the substring index is configured for the group membership attribute ( member or uniqueMember ),
the removal of a member from a large static group is pretty slow:

[11/Aug/2020:20:30:13.751180159 +0200] conn=8 op=1 MOD dn="cn=largeGroup,dc=large,dc=group,dc=university,dc=com"
[11/Aug/2020:20:32:45.997562241 +0200] conn=8 op=1 RESULT err=0 tag=103 nentries=0 etime=152.247032023


Version-Release number of selected component (if applicable):
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.8 Beta (Maipo)
#
# rpm -qa | grep 389-ds-base
389-ds-base-debuginfo-1.3.10.1-5.el7.tkt51166.x86_64
389-ds-base-libs-1.3.10.1-5.el7.tkt51166.x86_64
389-ds-base-1.3.10.1-5.el7.tkt51166.x86_64
389-ds-base-snmp-1.3.10.1-5.el7.tkt51166.x86_64
#

How reproducible:
Always.

Steps to Reproduce:
1. Create the substring index for the membership attribute.
2. Add a large static group.
3. Delete a member from the group.

Actual results:
The MOD operation to remove the value is too slow.

Expected results:
Fast MOD operation.

Additional info:
If the substring index is removed, the MOD operation takes less than a second:

[11/Aug/2020:20:19:50.161556531 +0200] conn=2 op=1 MOD dn="cn=largeGroup,dc=large,dc=group,dc=university,dc=com"
[11/Aug/2020:20:19:50.784878515 +0200] conn=2 op=1 RESULT err=0 tag=103 nentries=0 etime=0.623626797

Comment 4 mreynolds 2020-08-20 19:10:31 UTC
I could reproduce the issue:

I created a group with 150k members, and deleted a member of the group and it took over 8 seconds to complete when a substring index is present for member.

[20/Aug/2020:15:00:38.461356917 -0400] conn=5 op=1 MOD dn="cn=big-1,dc=example,dc=com"
[20/Aug/2020:15:00:47.448968760 -0400] conn=5 op=1 RESULT err=0 tag=103 nentries=0 wtime=0.000302920 optime=8.987646011 etime=8.987945700


Here are the steps to reproduce:

# dsctl slapd-localhost ldifgen groups --number 1 --suffix dc=example,dc=com --num-members 150000 --create-members --member-attr member --ldif-file /var/lib/dirsrv/slapd-localhost/ldif/group.ldif big

# dsconf slapd-localhost backend import userroot group.ldif

# ldapmodify -D "cn=directory manager" -w PASSWORD
dn: cn=big-1,dc=example,dc=com
changetype: modify
delete: member
member: uid=group_entry1-149999,dc=example,dc=com


CPU goes to 100%, and it takes almost 9 seconds to complete.