mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

gbellato
26.14.2009 651b64aa4873261d46fc54bc3283e73fb519a05c
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.
2 files modified
9 ■■■■■ changed files
opends/src/server/org/opends/server/replication/server/ReplicationBackend.java 4 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/service/ReplicationBroker.java 5 ●●●●● patch | view | raw | blame | history
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);
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()) ||