From af76fb0e296c962f0876a41b8157e0ad0acb716f Mon Sep 17 00:00:00 2001 From: Ludwig Krispenz Date: Tue, 14 Nov 2017 11:25:18 +0100 Subject: [PATCH] Ticket 49413 - Changelog trimming ignores disabled replica-agreement Bug: if a replication agreement is disabled it is not taken into account when changelog trimming determines where to stop. If the agreement is reenabled later replication can fail Fix: do not ignore disabled agreements in changelog trimming Reviewed by: ? --- ldap/servers/plugins/replication/cl5_api.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c index 55032df..949f1e5 100644 --- a/ldap/servers/plugins/replication/cl5_api.c +++ b/ldap/servers/plugins/replication/cl5_api.c @@ -4283,12 +4283,10 @@ _cl5GetRUV2Purge2(Object *fileObj, RUV **ruv) while (agmtObj) { agmt = (Repl_Agmt *)object_get_data(agmtObj); PR_ASSERT(agmt); - - if (!agmt_is_enabled(agmt)) { - agmtObj = agmtlist_get_next_agreement_for_replica(r, agmtObj); - continue; - } - + /* we need to handle all agreements, also if they are not enabled + * if they will be later enabled and changes are trimmed + * replication can fail + */ consRUVObj = agmt_get_consumer_ruv(agmt); if (consRUVObj) { consRUV = (RUV *)object_get_data(consRUVObj); -- 2.5.5