From 651b64aa4873261d46fc54bc3283e73fb519a05c Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Mon, 26 Jan 2009 14:14:39 +0000
Subject: [PATCH] Resets the current receive window of the ReplicationBroker to its initial value after the ReplicationBroker re-connect to a new ReplicationServer. Without this the old receive window from a previous connection was kept with the new connection leading to incoherent values between the Replication Server and the Directory Server.
---
opends/src/server/org/opends/server/replication/server/ReplicationBackend.java | 4 ++--
opends/src/server/org/opends/server/replication/service/ReplicationBroker.java | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java b/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java
index 053d3aa..1213d35 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Copyright 2007-2008 Sun Microsystems, Inc.
+ * Copyright 2007-2009 Sun Microsystems, Inc.
*/
package org.opends.server.replication.server;
import static org.opends.messages.BackendMessages.*;
@@ -1018,7 +1018,7 @@
entry.addObjectClass(objectclass);
Attribute changeNumber =
Attributes.create(CHANGE_NUMBER,
- msg.getChangeNumber().toStringUI());
+ msg.getChangeNumber().toString());
addAttribute(entry.getUserAttributes(), changeNumber);
Attribute domain = Attributes.create("replicationDomain", baseDN);
addAttribute(entry.getUserAttributes(), domain);
diff --git a/opends/src/server/org/opends/server/replication/service/ReplicationBroker.java b/opends/src/server/org/opends/server/replication/service/ReplicationBroker.java
index d70e1f2..f79d4c3 100644
--- a/opends/src/server/org/opends/server/replication/service/ReplicationBroker.java
+++ b/opends/src/server/org/opends/server/replication/service/ReplicationBroker.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Copyright 2006-2008 Sun Microsystems, Inc.
+ * Copyright 2006-2009 Sun Microsystems, Inc.
*/
package org.opends.server.replication.service;
@@ -502,7 +502,8 @@
{
sendWindow.release(Integer.MAX_VALUE);
}
- this.sendWindow = new Semaphore(maxSendWindow);
+ sendWindow = new Semaphore(maxSendWindow);
+ rcvWindow = maxRcvWindow;
connectPhaseLock.notify();
if ((replServerStartMsg.getGenerationId() == this.getGenerationID()) ||
--
Gitblit v1.10.0