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

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