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

Jean-Noel Rouvignac
03.30.2014 aacb8bbf0a764ce8eb205e0f6376c055b3e1baa8
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, April 3, 2014 15:30 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, April 3, 2014 15:30 +0200
commitaacb8bbf0a764ce8eb205e0f6376c055b3e1baa8
tree ca8d591269773d43bf8d8c12b89ef6e6f23c623e tree | zip | gz
parent e7e9ed01390f30b35a4bf0b9d7ceca04b892d35e view | diff
OPENDJ-1177 (CR-3314) Re-implement changelog purging logic

JEChangelogDB.java:
In ChangelogDBPurger.run(), changed code to:
- support the absence of change number index DB. To simplify matters, code assumes that ds-cfg-compute-change-number does not change during the life time of an RS.
- purged by using a CSN made up from the purge delay rather than using the previous cookie.
- sleep 500 millis if there are no changes to purge, or sleep till the next change to purge.
- gracefully shutdown without fuss in the logs.


JEChangeNumberIndexDB.java
In purgeUpTo(), return the oldest non purged CSN rather than the previous cookie + merged two branches of the code.

ExternalChangeLogTest.java:
Consequence of the change to JEChangeNumberIndexDB.
Extracted method assertECLLimits() from ECLCompatTestLimits() + added a loop inside it to let the code persist changes asynchronously from the test thread.

JEChangeNumberIndexDBTest.java:
Renamed testTrim() to testPurge().
In newReplicationServer(), enabled ds-cfg-compute-change-number.
4 files modified
222 ■■■■■ changed files
opends/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDB.java 35 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java 86 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ExternalChangeLogTest.java 91 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDBTest.java 10 ●●●●● diff | view | raw | blame | history