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.
This issue has been filed against an older version of UCS. With further development of our products affected components may have vastly changed while the corresponding use cases might have changed. Thus, this issue is now being closed. If there still is a need for this feature, please use "Clone this bug" or reopen this issue. In this case please provide information on how this issue would benefit you.