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

Jean-Noel Rouvignac
17.05.2014 d49865ef6dfb4e88a9ca358ea69457638b11b121
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, April 17, 2014 17:05 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, April 17, 2014 17:05 +0200
commitd49865ef6dfb4e88a9ca358ea69457638b11b121
tree ae4ad4b5f25ebe835445a8aa029603844987e641 tree | zip | gz
parent b24eeec1d7e739355359a8f65892078f454de2f4 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/opends/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexer.java 30 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexerTest.java 39 ●●●● diff | view | raw | blame | history