andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone

Blame 0378-Ticket-48445-keep-alive-entries-can-break-replicatio.patch

dc8c34
From fc202a17f24ecb585680b4a31586d7eec03489a7 Mon Sep 17 00:00:00 2001
dc8c34
From: Thierry Bordaz <tbordaz@redhat.com>
dc8c34
Date: Wed, 10 Feb 2016 15:17:02 +0100
dc8c34
Subject: [PATCH 378/378] Ticket 48445: keep alive entries can break
dc8c34
 replication
dc8c34
dc8c34
Bug Description:
dc8c34
	On the consumer side, at the end of a total update the replica is enabled and the changelog recreated.
dc8c34
	When the replica is enabled the keep alive entry (for that replica) is created .
dc8c34
	There is a race condition (that look quite systematic in our tests) if the creation of the entry is added to the changelog
dc8c34
	before the changelog is recreated.
dc8c34
	In that case the ADD is erased from the CL and will never be replicated.
dc8c34
dc8c34
	The keep alive entry is created (if it does not already exist) :
dc8c34
		- during a total update (as supplier)
dc8c34
		- when the keep alive is updated
dc8c34
		- when the replica is enabled
dc8c34
dc8c34
Fix Description:
dc8c34
	It is not strictly necessary to create the keep alive when the replica is enabled.
dc8c34
	So we can skip the creation during that step.
dc8c34
dc8c34
https://fedorahosted.org/389/ticket/48445
dc8c34
dc8c34
Reviewed by: Mark Reynolds (thank you Mark)
dc8c34
dc8c34
Platforms tested: F23
dc8c34
dc8c34
Flag Day: no
dc8c34
dc8c34
Doc impact: no
dc8c34
dc8c34
(cherry picked from commit 71a891f0dcfd1aafeb3913279d42e33ed2355312)
dc8c34
(cherry picked from commit 02af085c2a9c23536c8d276ee35794ec6efc81f5)
dc8c34
(cherry picked from commit 3bbcf2071788e0ff3194c4803b06deec67054fe7)
dc8c34
(cherry picked from commit 70e6c011a481b61830120568e5449ef4dfe48276)
dc8c34
---
dc8c34
 ldap/servers/plugins/replication/repl5_replica.c | 1 -
dc8c34
 1 file changed, 1 deletion(-)
dc8c34
dc8c34
diff --git a/ldap/servers/plugins/replication/repl5_replica.c b/ldap/servers/plugins/replication/repl5_replica.c
dc8c34
index 1852cf6..c5e38ee 100644
dc8c34
--- a/ldap/servers/plugins/replication/repl5_replica.c
dc8c34
+++ b/ldap/servers/plugins/replication/repl5_replica.c
dc8c34
@@ -3772,7 +3772,6 @@ replica_enable_replication (Replica *r)
dc8c34
         /* What to do ? */
dc8c34
     }
dc8c34
 
dc8c34
-    replica_subentry_check(r->repl_root, replica_get_rid(r));
dc8c34
     /* Replica came back online, Check if the total update was terminated.
dc8c34
        If flag is still set, it was not terminated, therefore the data is
dc8c34
        very likely to be incorrect, and we should not restart Replication threads...
dc8c34
-- 
dc8c34
2.4.3
dc8c34