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

Ludovic Poitou
20.07.2010 617fe1eab356125bc82c7bac69a322f5a29fbdc8
Fix for OPENDJ-3 - persistent search option for cn=changelog
The persistent search option for cn=changelog was only working with specific options that are not the default ones.
More specifically, it wouldn't work in ChangesOnly mode (returning error 53: Unwilling to perform).
Those changes are resolving the issues, fix a typo in a comment and changed code order and test to avoid double negatives.
3 files modified
11 ■■■■ changed files
opends/src/server/org/opends/server/replication/protocol/StartECLSessionMsg.java 2 ●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ECLServerHandler.java 1 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/workflowelement/externalchangelog/ECLSearchOperation.java 8 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/replication/protocol/StartECLSessionMsg.java
@@ -78,7 +78,7 @@
  /**
   * This specifies that the request on the ECL is a PERSISTENT search
   * with changesOnly = false.
   * with changesOnly = true.
   */
  public final static short PERSISTENT_CHANGES_ONLY = 2;
opends/src/server/org/opends/server/replication/server/ECLServerHandler.java
@@ -745,6 +745,7 @@
            StartECLSessionMsg.PERSISTENT_CHANGES_ONLY)
          {
            newDomainCtxt.startState = rsd.getEligibleState(eligibleCN, true);
            startStatesFromProvidedCookie.remove(rsd.getBaseDn());
          }
          else
          {
opends/src/server/org/opends/server/workflowelement/externalchangelog/ECLSearchOperation.java
@@ -545,12 +545,12 @@
          // If we're only interested in changes, then we don't actually want
          // to process the search now.
          if (!psearchControl.getChangesOnly())
            startECLSessionMsg.setPersistent(
                StartECLSessionMsg.PERSISTENT);
          else
          if (psearchControl.getChangesOnly())
            startECLSessionMsg.setPersistent(
                StartECLSessionMsg.PERSISTENT_CHANGES_ONLY);
          else
            startECLSessionMsg.setPersistent(
                StartECLSessionMsg.PERSISTENT);
        }
        else if (oid.equals(OID_LDAP_SUBENTRIES))
        {