Blame SOURCES/0073-Ticket-48325-Replica-promotion-leaves-RUV-out-of-ord.patch

246821
From 1a10e14ce3f05f961e80c4c8cf170d92945c25a1 Mon Sep 17 00:00:00 2001
246821
From: Mark Reynolds <mreynolds@redhat.com>
246821
Date: Fri, 6 Nov 2015 14:41:36 -0500
246821
Subject: [PATCH 73/75] Ticket 48325 - Replica promotion leaves RUV out of
246821
 order
246821
246821
Bug Description:  When promoting a consumer to a master the new RUV
246821
                  element is appended to the RUV.  However, when trying
246821
                  to replicate from the newly promoted replica the
246821
                  remote replica checks the first element in the RUV
246821
                  and sees that its the same replica ID, and aborts the
246821
                  replication session.  Essentailly this completely
246821
                  breaks replication between the two servers, and can
246821
                  actually corrupt other RUVs on other replicas.
246821
246821
Fix Description:  When promoting a replica to a master, reorder the RUV
246821
                  so that it is the first in the list.
246821
246821
https://fedorahosted.org/389/ticket/48325
246821
246821
Reviewed by: nhosoi(Thanks!)
246821
246821
(cherry picked from commit b896840d270a540698f35a4aac4f7a91742952b0)
246821
(cherry picked from commit 6180b91c3f65e9c5e375816a72baa95678458a0a)
246821
---
246821
 ldap/servers/plugins/replication/repl5_replica_config.c | 1 +
246821
 1 file changed, 1 insertion(+)
246821
246821
diff --git a/ldap/servers/plugins/replication/repl5_replica_config.c b/ldap/servers/plugins/replication/repl5_replica_config.c
246821
index e85ae3e..4d7135c 100644
246821
--- a/ldap/servers/plugins/replication/repl5_replica_config.c
246821
+++ b/ldap/servers/plugins/replication/repl5_replica_config.c
246821
@@ -1003,6 +1003,7 @@ replica_config_change_type_and_id (Replica *r, const char *new_type,
246821
                 csngen_rewrite_rid(gen, rid);
246821
                 if(purl && type == REPLICA_TYPE_UPDATABLE){
246821
                     ruv_add_replica(ruv, rid, purl);
246821
+                    ruv_move_local_supplier_to_first(ruv, rid);
246821
                     replica_reset_csn_pl(r);
246821
                 }
246821
                 ruv_delete_replica(ruv, oldrid);
246821
-- 
246821
2.4.3
246821