ldap/servers/slapd/back-ldbm/ldbm_index_config.c | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit a64a2e9b9ea231550c3b380249ebb7ab715c4d32
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Wed Jul 13 16:24:19 2016 -0400
Ticket 48922 - Fix crash when deleting backend while import is running
Bug Description: If you delete a backend from the config while an
import is running the server can crash.
Fix Description: When deleting a backend from the config wait for the
backend instance to not be busy before removing the
indexes. Otherwise the dbenv is not stable and this
can cause the crash.
https://fedorahosted.org/389/ticket/48922
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit 6c77c37ae5ce847ffa2bd75287dbd157c2f2d6af)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
b/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
index 42c8ffe..bbdb13c 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
@@ -151,6 +151,12 @@ ldbm_instance_index_config_delete_callback(Slapi_PBlock *pb,
Slapi_Entry* e, Sla
rc = SLAPI_DSE_CALLBACK_ERROR;
goto bail;
}
+
+ while(is_instance_busy(inst)){
+ /* Wait for import/indexing job to complete */
+ DS_Sleep(PR_SecondsToInterval(1));
+ }
+
*returncode = LDAP_SUCCESS;
slapi_entry_attr_find(e, "cn", &attr);