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

pgamba
07.36.2007 86847c52855283d5e7092f8edab36e836929baad
Fix 2572- dsreplication initialize is completed but entries are missing
5 files modified
27 ■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplLDIFInputStream.java 2 ●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java 14 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationMonitor.java 4 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java 6 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java 1 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplLDIFInputStream.java
@@ -130,7 +130,7 @@
    }
    index += copiedLength;
    if (receivedLength <= len)
    if (index == bytes.length)
      bytes = null;
    return copiedLength;
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationDomain.java
@@ -107,6 +107,7 @@
import org.opends.server.tasks.InitializeTargetTask;
import org.opends.server.tasks.InitializeTask;
import org.opends.server.tasks.TaskUtils;
import org.opends.server.types.ExistingFileBehavior;
import org.opends.server.types.AbstractOperation;
import org.opends.server.types.Attribute;
import org.opends.server.types.AttributeType;
@@ -2211,6 +2212,15 @@
  }
  /**
   * Get the server ID.
   * @return The server ID.
   */
  public int getServerId()
  {
    return serverId;
  }
  /**
   * Check if the domain solve conflicts.
   *
   * @return a boolean indicating if the domain should sove conflicts.
@@ -3175,8 +3185,8 @@
        importConfig.setAppendToExistingData(false);
        // TODO How to deal with rejected entries during the import
        // importConfig.writeRejectedEntries("rejectedImport",
        // ExistingFileBehavior.OVERWRITE);
        importConfig.writeRejectedEntries("rejectedImport",
         ExistingFileBehavior.OVERWRITE);
        // Process import
        backend.importLDIF(importConfig);
opendj-sdk/opends/src/server/org/opends/server/replication/plugin/ReplicationMonitor.java
@@ -129,6 +129,10 @@
    addMonitorData(attributes, "unresolved-naming-conflicts",
                   domain.getNumUnresolvedNamingConflicts());
    /* get server-id */
    addMonitorData(attributes, "server-id",
                   domain.getServerId());
    /* get window information */
    addMonitorData(attributes, "max-rcv-window", domain.getMaxRcvWindow());
    addMonitorData(attributes, "current-rcv-window",
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/InitOnLineTest.java
@@ -79,6 +79,7 @@
import org.opends.server.types.ResultCode;
import org.opends.server.types.SearchFilter;
import org.opends.server.types.SearchScope;
import org.opends.server.util.Base64;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -433,7 +434,7 @@
    char bigAttributeValue[] = new char[30240];
    for (int i=0; i<bigAttributeValue.length; i++)
      bigAttributeValue[i] = Integer.toString(i).charAt(0);
    String[] entries =
    {
        "dn: dc=example,dc=com\n"
@@ -456,7 +457,8 @@
        + "cn: Fiona Jensen\n"
        + "sn: Jensen\n"
        + "uid: fiona\n"
        + "telephonenumber: +1 408 555 1212\n"
        + "telephonenumber:: "+ Base64.encode(
            new String(bigAttributeValue).getBytes())+"\n"
        + "entryUUID: 21111111-1111-1111-1111-111111111113\n"
        + "\n",
          "dn: cn=Robert Langman,ou=people,dc=example,dc=com\n"
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ReplicationTestCase.java
@@ -373,6 +373,7 @@
    catch (NoSuchElementException e) {
      // done
    }
    synchroServerEntry = null;
  }
  /**