ldb one-level search performance issue

Andrew Bartlett abartlet at samba.org
Tue May 29 05:29:54 UTC 2018

On Tue, 2018-05-29 at 06:54 +1200, Andrew Bartlett via samba-technical
> The challenge continues:
> https://gitlab.com/catalyst-samba/samba/-/jobs/70819529
> [778(4311)/853 at 1h17m51s]
> samba4.ldap.password_settings.python(ad_dc_ntvfs)
> UNEXPECTED(error):
> samba4.ldap.password_settings.python.password_settings.PasswordSettings
> TestCase.test_pso_special_groups(ad_dc_ntvfs)
> REASON: Exception: Exception: Traceback (most recent call last):
>   File "/tmp/samba-
> testbase/b12/samba/source4/dsdb/tests/python/password_settings.py",
> line 68, in tearDown
>     self.ldb.delete(self.ou, ["tree_delete:1"])
> LdbError: (68, 'LDAP error 68 LDAP_ENTRY_ALREADY_EXISTS -  <error in
> module samldb: Entry already exists during LDB_DELETE (68)> <>')
> Very strange, but I will continue to investigate. 
> Presumably something was relying on the wrong behaviour, ouch!

For those playing along at home, that was fairly easy to fix (a legit
check in samldb being caught when the index order started to be used),
but now I get:

make test TESTS="deletetest rodc" 
Failed to apply linked attribute change 'attribute 'isDeleted': invalid modify flags on 'CN=g1_1527570609273,CN=Users,DC=samba,DC=example,DC=com': 0x0'
dn: <GUID=3d7414c6-5452-44d9-8fe7-e2f9cea10630>;<SID=S-1-5-21-1563496149-3725486322-1080499614-1167>;CN=g1_1527570609273,CN=Users,DC=samba,DC=example,DC=com
changetype: modify
isDeleted: FALSE
replace: member
member: <GUID=3ba9306f-f205-418f-827a-fc5df960c5cb>;<RMD_ADDTIME=1317204420900
replace: whenChanged
whenChanged: 20180529051042.0Z
replace: uSNChanged
uSNChanged: 3898

The fix is not to re-use a search result (possibly containing
isDeleted) during the repl_meta_data link processing.  I'll fix that up
and re-submit.

The fun continues!

Andrew Bartlett

Andrew Bartlett
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   

More information about the samba-technical mailing list