Blame SOURCES/0049-Ticket-49413-Changelog-trimming-ignores-disabled-rep.patch

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