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

Jean-Noel Rouvignac
30.09.2014 4d8fd404b195b5ae6b4115c33d95828dfc9f2662
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Wednesday, April 30, 2014 15:09 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Wednesday, April 30, 2014 15:09 +0200
commit4d8fd404b195b5ae6b4115c33d95828dfc9f2662
tree e7c9a4556889e2b281383297d6d2bd5eaf0a8414 tree | zip | gz
parent 88ba10b70627da45028c355eb920f021c7fc92a7 view | diff
OPENDJ-1440 On startup, change number can progress without waiting for any heartbeat from known replicas

On startup, if a replication server knows about several replicas, then it must wait to receive some sort of alive information for each of them before being able to move the medium consistency forward.
Changes or heartbeats received after replication server started are acceptable.
Likewise, changes that would have been received before the replication server stopped are also acceptable.

This was fixed on replication server startup, by initializing the lastAliveCSN for each known replica, with the oldest possible CSN (timestamp == 0).
Then when checking if the medium consistency can move forward, if no medium consistency is set, then the lastAliveCSN for each known replica must have a timestamp != 0.


ChangeNumberIndexer.java:
In canMoveForwardMediumConsistencyPoint(), call allInitialReplicasArePastOldestPossibleCSN() if the medium consistency CSN is not set.
Added methods oldestPossibleCSN(), allInitialReplicasAreAlive().

ChangeNumberIndexerTest.java:
In emptyDBTwoInitialDSs(), slightly modified the code to test current bug.
In startCNIndexer(), added the initial ECL enabled domains as a parameter.
2 files modified
69 ■■■■■ changed files
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexer.java 30 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexerTest.java 39 ●●●● diff | view | raw | blame | history