Blame SOURCES/0048-Ticket-49446-cleanallruv-should-ignore-cleaned-repli.patch

058656
From 7fa2f146c80ed64217bb0c1022c99bd1948cdc7c Mon Sep 17 00:00:00 2001
058656
From: Ludwig Krispenz <lkrispen@redhat.com>
058656
Date: Thu, 11 Jan 2018 15:56:21 +0100
058656
Subject: [PATCH] Ticket 49446 - cleanallruv should ignore cleaned replica Id
058656
 in processing changelog if in force mode
058656
058656
Bug: If the startcsn is calculated based on a cleaned rid, it could be missing from the changelog.
058656
058656
Fix: In force mode we do not care that the topology gets in sync for the cleaned RID, so we can ignore it
058656
     in an earlier stage, instead of setting it to precleane only.
058656
058656
Reviewed by: Thierry, thanks
058656
---
058656
 ldap/servers/plugins/replication/repl5_replica_config.c | 10 ++++++++--
058656
 1 file changed, 8 insertions(+), 2 deletions(-)
058656
058656
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
058656
index e025f34d8..005528a41 100644
058656
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
058656
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
058656
@@ -1688,9 +1688,15 @@ replica_cleanallruv_thread(void *arg)
058656
     }
058656
     /*
058656
      *  Presetting the rid prevents duplicate thread creation, but allows the db and changelog to still
058656
-     *  process updates from the rid.  set_cleaned_rid() blocks updates, so we don't want to do that... yet.
058656
+     *  process updates from the rid.
058656
+     *  set_cleaned_rid() blocks updates, so we don't want to do that... yet unless we are in force mode.
058656
+     *  If we are forcing a clean independent of state of other servers for this RID we can set_cleaned_rid()
058656
      */
058656
-    preset_cleaned_rid(data->rid);
058656
+    if (data->force) {
058656
+        set_cleaned_rid(data->rid);
058656
+    } else {
058656
+        preset_cleaned_rid(data->rid);
058656
+    }
058656
     rid_text = slapi_ch_smprintf("%d", data->rid);
058656
     csn_as_string(data->maxcsn, PR_FALSE, csnstr);
058656
     /*
058656
-- 
058656
2.13.6
058656