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

Jean-Noel Rouvignac
09.35.2013 844e17d35395eebf235505e983e4be3f702d3978
opendj-sdk/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java
@@ -186,8 +186,8 @@
          .append(")")
          .append("] [nextNonEligibleMsg=").append(nextNonEligibleMsg)
          .append("] [startState=").append(startState)
          .append("] [stopState=").append(stopState)
          .append("] [currentState=").append(currentState)
          .append("] [stopState=").append(stopState)
          .append("]]");
    }
@@ -735,11 +735,10 @@
      }
      // skip unused domains
      final ServerState latestServerState = domain.getLatestServerState();
      if (latestServerState.isEmpty())
      final ServerState latestState = domain.getLatestServerState();
      if (latestState.isEmpty())
        continue;
      // Creates the new domain context
      final DomainContext newDomainCtxt = new DomainContext();
      newDomainCtxt.active = true;
@@ -749,7 +748,7 @@
      // Assign the start state for the domain
      if (isPersistent == PERSISTENT_CHANGES_ONLY)
      {
        newDomainCtxt.startState = latestServerState;
        newDomainCtxt.startState = latestState;
        startStatesFromProvidedCookie.remove(domain.getBaseDN());
      }
      else
@@ -767,10 +766,9 @@
          // what we have in the replication changelog
          if (newDomainCtxt.startState == null)
          {
            CSN latestTrimCSN =
                new CSN(newDomainCtxt.domainLatestTrimDate, 0, 0);
            newDomainCtxt.startState =
                domain.getStartState().duplicateOnlyOlderThan(latestTrimCSN);
                domain.getOldestState().duplicateOnlyOlderThan(
                    newDomainCtxt.domainLatestTrimDate);
          }
        }
        else
@@ -790,7 +788,7 @@
          }
        }
        newDomainCtxt.stopState = latestServerState;
        newDomainCtxt.stopState = latestState;
      }
      newDomainCtxt.currentState = new ServerState();
@@ -860,12 +858,11 @@
      ServerState cookie)
  {
    /*
    when the provided startState is older than the replication
    changelogdb startState, it means that the replication
    changelog db has been trimmed and the cookie is not valid
    anymore.
    when the provided startState is older than the replication changelogdb
    oldestState, it means that the replication changelog db has been trimmed and
    the cookie is not valid anymore.
    */
    for (CSN dbOldestChange : rsDomain.getStartState())
    for (CSN dbOldestChange : rsDomain.getOldestState())
    {
      CSN providedChange = cookie.getCSN(dbOldestChange.getServerId());
      if (providedChange != null && providedChange.isOlderThan(dbOldestChange))