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

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