Bug 34813

Summary: add entryUUID to ldap/index/eq
Product: UCS Reporter: Felix Botner <botner>
Component: LDAPAssignee: Philipp Hahn <hahn>
Status: CLOSED FIXED QA Contact: Stefan Gohmann <gohmann>
Severity: normal    
Priority: P5 CC: gohmann, jmm
Version: UNSTABLE   
Target Milestone: UCS 3.2-1-errata   
Hardware: Other   
OS: Linux   
What kind of report is it?: --- What type of bug is this?: ---
Who will be affected by this bug?: --- How will those affected feel about the bug?: ---
User Pain: Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional):
Max CVSS v3 score:
Bug Depends on:    
Bug Blocks: 34815    

Description Felix Botner univentionstaff 2014-05-12 15:56:42 CEST
Seems that the listener looks for entryUUID, which is not indexed 

-> ucr set ldap/debug/level='256'
-> udm users/user create ...

/var/log/syslog:
...
May 12 16:03:12 master slapd[21341]: conn=1084 op=8 SRCH base="dc=w2k12,dc=test" scope=2 deref=0 filter="(entryUUID=e61b8256-6e29-1033-9a0b-4f930effdc4f)"
May 12 16:03:12 master slapd[21341]: conn=1084 op=8 SRCH attr=* +
May 12 16:03:12 master slapd[21341]: <= bdb_equality_candidates: (entryUUID) not indexed
...
Comment 1 Philipp Hahn univentionstaff 2014-05-15 15:35:18 CEST
Added entryUUID to ldap/index/eq.
r50305 | Bug #34813 LDAP: Add entryUUID to LDAP index

ucs-3.2-1/doc/errata/staging/2014-05-15-univention-ldap.yaml
r50311 | Bug #34813,#34815 LDAP: Add entryUUID to LDAP index


# ucr get ldap/index/eq | grep -o entryUUID
entryUUID

# univention-ldapsearch -LLL entryUUID | sed -ne 's/^entryUUID: //p' > /tmp/uuids
# #univention-ldapsearch -LLL -f /tmp/uuid '(entryUUID=%)' dn entryUUID >/dev/null
# time xargs -a /tmp/uuids -r -n1 -I % ldapsearch -D "uid=Administrator,cn=users,$(ucr get ldap/base)" -w univention -LLL '(entryUUID=%)' dn entryUUID >/dev/null

before:
real    0m6.287s
user    0m0.020s
sys     0m0.076s

after:
real    0m5.220s
user    0m0.040s
sys     0m0.060s
Comment 2 Philipp Hahn univentionstaff 2014-05-19 11:44:28 CEST
1 VM @ xen12 : 2 CPU, 4 GiB

# apt-get install ucs-test-tools
# import_ldif_without_listener /usr/share/ucs-test-tools/customer5000.ldif
# univention-ldapsearch -LLL entryUUID | sed -ne 's/^entryUUID: //p' >/tmp/uuids
# time univention-ldapsearch -LLL -f /tmp/uuids '(entryUUID=%s)' entryUUID | sed -ne 's/^entryUUID: //p' >/tmp/uuids2

before:
real 387m27.964s (= 6h 27m)

after:
real 0m10.441s
real 0m10.124s
real 0m9.476s
Comment 3 Stefan Gohmann univentionstaff 2014-05-20 07:41:31 CEST
YAML: OK

Code: OK

Tests: OK
Comment 4 Moritz Muehlenhoff univentionstaff 2014-05-20 12:57:18 CEST
http://errata.univention.de/ucs/3.2/114.html