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

Jean-Noel Rouvignac
04.07.2014 4f4948ee52a68b9efe6bb4584bc95f9f25b0fa5c
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Friday, April 4, 2014 16:07 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Friday, April 4, 2014 16:07 +0200
commit4f4948ee52a68b9efe6bb4584bc95f9f25b0fa5c
tree 78f5a10092f91e30c00d1a351b027ae37722bc72 tree | zip | gz
parent a613b86c781c69a62ab4e7dc18df58d7f08b61b1 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
224 ■■■■■ changed files
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDB.java 35 ●●●● diff | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/replication/server/changelog/je/JEChangelogDB.java 88 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/ExternalChangeLogTest.java 91 ●●●●● diff | view | raw | blame | history
opendj3-server-dev/tests/unit-tests-testng/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDBTest.java 10 ●●●●● diff | view | raw | blame | history