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

Jean-Noël Rouvignac
27.13.2016 5edd098f77ea5a4752bd68911147813a0875dc18
ReplicationDomainMonitorData.java: move calls to setMaxCSNs() directly inside setRSState()
2 files modified
15 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/replication/server/ReplicationDomainMonitor.java 14 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/server/ReplicationDomainMonitorData.java 1 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/server/ReplicationDomainMonitor.java
@@ -250,12 +250,7 @@
    // Then initialize the max CSN for the LS that produced something
    // - from our own local db state
    // - whatever they are directly or indirectly connected
    final ServerState dbServerState = domain.getLatestServerState();
    pendingMonitorData.setRSState(domain.getLocalRSServerId(), dbServerState);
    for (CSN storedCSN : dbServerState)
    {
      pendingMonitorData.setMaxCSN(storedCSN);
    }
    pendingMonitorData.setRSState(domain.getLocalRSServerId(), domain.getLatestServerState());
  }
  /**
@@ -281,13 +276,8 @@
      try
      {
        // Here is the RS state : list <serverID, lastCSN>
        // For each LDAP Server, we keep the max CSN across the RSes
        ServerState replServerDbState = msg.getReplServerDbState();
        pendingMonitorData.setMaxCSNs(replServerDbState);
        // store the remote RS states.
        pendingMonitorData.setRSState(msg.getSenderID(), replServerDbState);
        pendingMonitorData.setRSState(msg.getSenderID(), msg.getReplServerDbState());
        // Store the remote LDAP servers states
        for (int dsServerId : toIterable(msg.ldapIterator()))
opendj-server-legacy/src/main/java/org/opends/server/replication/server/ReplicationDomainMonitorData.java
@@ -325,6 +325,7 @@
  public void setRSState(int serverId, ServerState state)
  {
    rsStates.put(serverId, state);
    setMaxCSNs(state);
  }
  /**