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

Jean-Noel Rouvignac
23.18.2013 ff99696311668f339200080a826bbc6efc708291
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, December 23, 2013 11:18 +0100
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, December 23, 2013 11:18 +0100
commitff99696311668f339200080a826bbc6efc708291
tree 14b233a79149667bb5d2c033b564a9f39358776d tree | zip | gz
parent 62c3b0be396c487745f347eb2b4db912deb082f3 view | diff
OPENDJ-1263 Changenumber does not progress on the second replication server of a topology


The medium consistency point was not progressing on DSRS 2 because the ChangeNumberIndexer mediumConsistencyCSN had been polluted by CSN from "cn=admin data".
Problem is that ChangeNumberIndexer's publishUpdateMsg() was filtering out updates from ECL disabled domains, but not from domains unknown to ECL.
On start up, update messages can be received from replication domains have not been been configured yet on the current replication server.
The fix consists in only updating the medium consistency point with update messages or replica heartbeats coming from explicitly enabled replication domains.
After this fix, changes from ECL disabled domains will still be stored in dedicated replicaDBs, there is no change in this functionality.


MultimasterReplication.java
Renamed isECLDisabledDomain() to isECLEnabledDomain() so it caters better for the 3 states of the domains: enabled, disabled and unknown
Code cleanup.

ChangeNumberIndexer.java:
Extracted method isECLEnabledDomain() to use as a seam for unit testing which calls to MultimasterReplication.isECLEnabledDomain().

ChangeNumberIndexerTest.java
Added one test emptyDBThreeInitialDSsOneIsNotECLEnabledDomain().
Renamed assertAddedRecords() to assertExternalChangelogContent(), startIndexer() to startCNIndexer(), stopIndexer() to stopCNIndexer() and indexer to cnIndexer.
In startCNIndexer(), overrode ChangeNumberIndexer.isNotECLEnabledDomain().

AttributeTypeConstants.java:
Added support for "cn"
4 files modified
174 ■■■■■ changed files
opends/src/server/org/opends/server/replication/plugin/MultimasterReplication.java 23 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexer.java 26 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexerTest.java 117 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/types/AttributeTypeConstants.java 8 ●●●● diff | view | raw | blame | history