andykimpe / rpms / 389-ds-base

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

Blame SOURCES/0086-Ticket-48445-keep-alive-entries-can-break-replicatio.patch

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