From d774b19fe6a1626cca3c92b125e56a22771bba5a Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: May 19 2015 14:46:32 +0000 Subject: Ticket 48158 - cleanAllRUV task limit not being enforced correctly Bug Description: The task limit check was only counting tasks that had already begun the cleaning process. If the task was waiting for a replica to be online before it starting the cleaning process, then task count was not incremented, and limit check was essentially bypassed. Fix Description: Use the "pre-cleaned" rid list to determine the task count. The pre-cleaned list is updated as soon a task request comes in - not once the cleaning starts. https://fedorahosted.org/389/ticket/48158 Reviwed by: nhosoi(Thanks!) --- diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c index 717a765..6d6c733 100644 --- a/ldap/servers/plugins/replication/repl5_replica_config.c +++ b/ldap/servers/plugins/replication/repl5_replica_config.c @@ -3459,7 +3459,7 @@ get_cleanruv_task_count() slapi_rwlock_wrlock(rid_lock); for(i = 0; i < CLEANRIDSIZ; i++){ - if(cleaned_rids[i] != 0){ + if(pre_cleaned_rids[i] != 0){ count++; } }