Univention Bugzilla – Bug 50673
Reduce slapd downtime during updates by triggering online reindexing of LMDB
Last modified: 2020-04-20 10:27:40 CEST
The manpage of slapd-mdb has this interesting statement: > changing index settings dynamically by LDAPModifying "cn=config" > automatically causes rebuilding of the indices online in a background task. This could be useful e.g. to reduce re-indexing delays during updates of large environments.
From a quick look into the code it looks like slapd-mdb re-indexes *everything* by iterating over all entries. I think we need some resource/performance test of this feature to find out the conditions (size of database, number of cores) where this is a good option. FYI: slapindex on the other hand offers the option to only index specific attributes, but our ldap_setup_index script currently doesn't make use of that. I guess we also need to think about a way to ensure that this is not run multiple times during an update or join (see Bug 49821), e.g. in case an app package uses ldap_setup_index to configure another index. We could delay the re-inxeding by making ldap_setup_index just set an UCR variable which later triggers the actual re-indexing (with cron or dpkg triggers or whatever). But the indexing should not "hit" the admins unexpectedly and bog down the servers.