From e72a50dee2a7fe4317ffd609067fee8eb07a7831 Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Wed, 28 May 2008 14:42:41 +0000
Subject: [PATCH] Fix 2911 - dsreplication pre/post-external initialisation fails to clear all the changelogs

---
 opends/src/server/org/opends/server/replication/server/ServerHandler.java |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/server/ServerHandler.java b/opends/src/server/org/opends/server/replication/server/ServerHandler.java
index c56fc8a..a99ad1b 100644
--- a/opends/src/server/org/opends/server/replication/server/ServerHandler.java
+++ b/opends/src/server/org/opends/server/replication/server/ServerHandler.java
@@ -508,8 +508,14 @@
             }
             else
             {
-              // The remote has no genId. We don't change anything for the
-              // current RS.
+              // The remote RS had no genId while the local one has one genID.
+              // In our start msg, we have just sent our local genID to
+              // the remote RS that will immediatly adopt it
+              // So let's store our local genID as the genID of the remote RS.
+              // It is necessary to do so, in order to not have a 'bad genID'
+              // error when we will try to send updates to the remote RS
+              // (before receiving the infoMsg from the remote RS !!!)
+              generationId = localGenerationId;
             }
           }
           else

--
Gitblit v1.10.0