| | |
| | | .append(")") |
| | | .append("] [nextNonEligibleMsg=").append(nextNonEligibleMsg) |
| | | .append("] [startState=").append(startState) |
| | | .append("] [stopState=").append(stopState) |
| | | .append("] [currentState=").append(currentState) |
| | | .append("] [stopState=").append(stopState) |
| | | .append("]]"); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | // 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; |
| | |
| | | // Assign the start state for the domain |
| | | if (isPersistent == PERSISTENT_CHANGES_ONLY) |
| | | { |
| | | newDomainCtxt.startState = latestServerState; |
| | | newDomainCtxt.startState = latestState; |
| | | startStatesFromProvidedCookie.remove(domain.getBaseDN()); |
| | | } |
| | | else |
| | |
| | | // 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 |
| | |
| | | } |
| | | } |
| | | |
| | | newDomainCtxt.stopState = latestServerState; |
| | | newDomainCtxt.stopState = latestState; |
| | | } |
| | | newDomainCtxt.currentState = new ServerState(); |
| | | |
| | |
| | | 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)) |