From 0d2516aceb494c6b226d7ece03397ea7e85d67b0 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Sep 07 2012 17:41:10 +0000 Subject: Ticket 450 - CLEANALLRUV task gets stuck on winsync replication agreement Bug Description: cleanallruv task was incorrectly processing winsync agmts, which lead to errors and failures Fix Description: Ignore winsync agmts during cleanallruv task processing. https://fedorahosted.org/389/ticket/450 Reviewed by: ? --- diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c index fbb0667..38fce99 100644 --- a/ldap/servers/plugins/replication/repl5_replica_config.c +++ b/ldap/servers/plugins/replication/repl5_replica_config.c @@ -1549,7 +1549,7 @@ replica_cleanallruv_thread(void *arg) } while (agmt_obj){ agmt = (Repl_Agmt*)object_get_data (agmt_obj); - if(!agmt_is_enabled(agmt)){ /* skip disabled replicas */ + 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); continue; } @@ -1602,7 +1602,7 @@ replica_cleanallruv_thread(void *arg) } while (agmt_obj && !slapi_is_shutting_down()){ agmt = (Repl_Agmt*)object_get_data (agmt_obj); - if(!agmt_is_enabled(agmt)){ /* skip disabled replicas */ + 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); continue; } @@ -1695,7 +1695,7 @@ check_agmts_are_caught_up(Replica *replica, ReplicaId rid, char *maxcsn, Slapi_T } while (agmt_obj){ agmt = (Repl_Agmt*)object_get_data (agmt_obj); - if(!agmt_is_enabled(agmt)){ /* skip disabled replicas */ + if(!agmt_is_enabled(agmt) || get_agmt_agreement_type(agmt) == REPLICA_TYPE_WINDOWS){ agmt_obj = agmtlist_get_next_agreement_for_replica (replica, agmt_obj); continue; } @@ -1750,7 +1750,7 @@ check_agmts_are_alive(Replica *replica, ReplicaId rid, Slapi_Task *task) } while (agmt_obj){ agmt = (Repl_Agmt*)object_get_data (agmt_obj); - if(!agmt_is_enabled(agmt)){ /* skip disabled replicas */ + if(!agmt_is_enabled(agmt) || get_agmt_agreement_type(agmt) == REPLICA_TYPE_WINDOWS){ agmt_obj = agmtlist_get_next_agreement_for_replica (replica, agmt_obj); continue; } @@ -2160,7 +2160,7 @@ delete_cleaned_rid(Replica *r, ReplicaId rid, CSN *maxcsn) agmt_obj = agmtlist_get_first_agreement_for_replica (r); while (agmt_obj){ agmt = (Repl_Agmt*)object_get_data (agmt_obj); - if(!agmt_is_enabled(agmt)){ + if(!agmt_is_enabled(agmt) || get_agmt_agreement_type(agmt) == REPLICA_TYPE_WINDOWS){ agmt_obj = agmtlist_get_next_agreement_for_replica (r, agmt_obj); continue; } @@ -2337,7 +2337,7 @@ replica_abort_task_thread(void *arg) agmt_obj = agmtlist_get_first_agreement_for_replica (data->replica); while (agmt_obj){ agmt = (Repl_Agmt*)object_get_data (agmt_obj); - if(!agmt_is_enabled(agmt)){ /* skip disabled replicas */ + 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); continue; }