| | |
| | | CSN eligibleCSN = null; |
| | | |
| | | final ServerState newestCSNs = domainDB.getDomainNewestCSNs(baseDN); |
| | | for (final CSN changelogNewestCSN : newestCSNs) |
| | | for (final CSN replicaNewestCSN : newestCSNs) |
| | | { |
| | | // Should it be considered for eligibility ? |
| | | int serverId = changelogNewestCSN.getServerId(); |
| | | int serverId = replicaNewestCSN.getServerId(); |
| | | CSN heartbeatLastCSN = getChangeTimeHeartbeatState().getCSN(serverId); |
| | | |
| | | // If the most recent UpdateMsg or CLHeartbeatMsg received is very old |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (changelogNewestCSN != null |
| | | if (replicaNewestCSN != null |
| | | && (eligibleCSN == null || |
| | | changelogNewestCSN.isNewerThan(eligibleCSN))) |
| | | replicaNewestCSN.isNewerThan(eligibleCSN))) |
| | | { |
| | | eligibleCSN = changelogNewestCSN; |
| | | eligibleCSN = replicaNewestCSN; |
| | | } |
| | | if (heartbeatLastCSN != null |
| | | && (eligibleCSN == null || heartbeatLastCSN.isNewerThan(eligibleCSN))) |