ldap/servers/plugins/replication/repl5_replica_config.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit c41d36de0ca438bf23e4e810bfec0fd59cbc790b
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Fri Sep 18 11:56:29 2015 -0400
Ticket 48217 - cleanallruv - fix regression with server shutdown
Bug Description: Recent checks for server shutdown were added to cleanallruv task,
but we did not properly check for "shutdown" at the end of
the task.
This caused the server to think the task successfully finished,
when in fact it did not.
Fix Description: Properly check for shutdown at the end of the task, and handler it
appropriately.
https://fedorahosted.org/389/ticket/48217
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c
b/ldap/servers/plugins/replication/repl5_replica_config.c
index 446da3f..8d3c481 100644
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
@@ -1948,7 +1948,7 @@ done:
/*
* If the replicas are cleaned, release the rid
*/
- if(!aborted){
+ if(!aborted && !slapi_is_shutting_down()){
delete_cleaned_rid_config(data);
/* make sure all the replicas have been "pre_cleaned" before finishing
*/
check_replicas_are_done_cleaning(data);
@@ -3005,7 +3005,7 @@ replica_abort_task_thread(void *arg)
}
/*
- * Now send the cleanruv extended op to all the agreements
+ * Now send the abort cleanruv extended op to all the agreements
*/
while(agmt_not_notified && !slapi_is_shutting_down()){
agmt_obj = agmtlist_get_first_agreement_for_replica (data->replica);
@@ -3013,7 +3013,7 @@ replica_abort_task_thread(void *arg)
agmt_not_notified = 0;
break;
}
- while (agmt_obj){
+ while (agmt_obj && !slapi_is_shutting_down()){
agmt = (Repl_Agmt*)object_get_data (agmt_obj);
if(!agmt_is_enabled(agmt) || get_agmt_agreement_type(agmt) ==
REPLICA_TYPE_WINDOWS){
agmt_obj = agmtlist_get_next_agreement_for_replica (data->replica,
agmt_obj);
@@ -3058,7 +3058,7 @@ replica_abort_task_thread(void *arg)
} /* while */
done:
- if(agmt_not_notified){
+ if(agmt_not_notified || slapi_is_shutting_down()){
/* failure */
cleanruv_log(data->task, data->rid, ABORT_CLEANALLRUV_ID,"Abort task
failed, will resume the task at the next server startup.");
} else {
--
389 commits mailing list
389-commits@%(host_name)s
http://lists.fedoraproject.org/postorius/389-commits@lists.fedoraproject.org