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

Jean-Noel Rouvignac
30.09.2014 cff9a1206a81a96ffa2e0124fb4d1cecdf9b4834
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
commitcff9a1206a81a96ffa2e0124fb4d1cecdf9b4834
tree ffa0482d674b8ea17212370c4bdb791b2afae864 tree | zip | gz
parent 4589898a83ea7426676fefcbf2f25cbcb05f4314 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
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexer.java 30 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexerTest.java 39 ●●●● diff | view | raw | blame | history