opends/src/server/org/opends/server/replication/server/ECLServerHandler.java
@@ -1335,7 +1335,7 @@ // The following loop allows to loop until being on the same cn in the 2 dbs CSN csnFromReplicaDB = replicaDBChange.getUpdateMsg().getCSN(); DN dnFromReplicaDB = replicaDBChange.getBaseDN(); DN baseDNFromReplicaDB = replicaDBChange.getBaseDN(); while (true) { @@ -1348,16 +1348,16 @@ final ChangeNumberIndexRecord currentRecord = cnIndexDBCursor.getRecord(); final CSN csnFromCNIndexDB = currentRecord.getCSN(); final DN dnFromCNIndexDB = currentRecord.getBaseDN(); final DN baseDNFromCNIndexDB = currentRecord.getBaseDN(); if (debugEnabled()) TRACER.debugInfo("assignChangeNumber() comparing the replicaDB's and" + " CNIndexDB's DNs :" + dnFromReplicaDB + "?=" + dnFromCNIndexDB + " timestamps:" + asDate(csnFromReplicaDB) + " ?older" + asDate(csnFromCNIndexDB)); + " CNIndexDB's baseDNs :" + baseDNFromReplicaDB + "?=" + baseDNFromCNIndexDB + " timestamps:" + asDate(csnFromReplicaDB) + " ?older" + asDate(csnFromCNIndexDB)); if (areSameChange(csnFromReplicaDB, dnFromReplicaDB, csnFromCNIndexDB, dnFromCNIndexDB)) if (areSameChange(csnFromReplicaDB, baseDNFromReplicaDB, csnFromCNIndexDB, baseDNFromCNIndexDB)) { // We matched the ReplicaDB change with a record in the CNIndexDB // => set the changeNumber in memory and return the change to the client @@ -1418,9 +1418,9 @@ return new Date(csn.getTime()); } private boolean areSameChange(CSN csn1, DN dn1, CSN csn2, DN dn2) private boolean areSameChange(CSN csn1, DN baseDN1, CSN csn2, DN baseDN2) { boolean sameDN = dn1.compareTo(dn2) == 0; boolean sameDN = baseDN1.compareTo(baseDN2) == 0; boolean sameCSN = csn1.compareTo(csn2) == 0; return sameDN && sameCSN; } opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java
@@ -210,7 +210,9 @@ ServerState startAfterServerState) throws ChangelogException; /** * for the specified serverId and replication domain. * Publishes the provided change to the changelog DB for the specified * serverId and replication domain. After a change has been successfully * published, it becomes available to be returned by the External ChangeLog. * * @param baseDN * the replication domain baseDN @@ -231,11 +233,11 @@ * * @param baseDN * the replication domain baseDN * @param csn * @param heartbeatCSN * The CSN heartbeat sent by this replica (contains the serverId and * timestamp of the heartbeat) */ void replicaHeartbeat(DN baseDN, CSN csn); void replicaHeartbeat(DN baseDN, CSN heartbeatCSN); /** * Let the DB know this replica is going down. @@ -249,8 +251,8 @@ * * @param baseDN * the replication domain baseDN * @param serverId * The replica's serverId going offline * @param offlineCSN * The CSN (serverId and timestamp) for the replica's going offline */ void replicaOffline(DN baseDN, int serverId); void replicaOffline(DN baseDN, CSN offlineCSN); } opends/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java
@@ -753,7 +753,7 @@ /** {@inheritDoc} */ @Override public void replicaHeartbeat(DN baseDN, CSN csn) public void replicaHeartbeat(DN baseDN, CSN heartbeatCSN) { // TODO implement this when the changelogDB will be responsible for // maintaining the medium consistency point @@ -761,9 +761,11 @@ /** {@inheritDoc} */ @Override public void replicaOffline(DN baseDN, int serverId) public void replicaOffline(DN baseDN, CSN offlineCSN) { // TODO implement this when the changelogDB will be responsible for // maintaining the medium consistency point // TODO make sure that this operation will not lose changes // TODO save this state in the changelogStateDB? } }