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

Jean-Noel Rouvignac
02.47.2014 d9b412170996aa617f6303104b7fc5ea0892de0a
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, January 2, 2014 16:47 +0100
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, January 2, 2014 16:47 +0100
commitd9b412170996aa617f6303104b7fc5ea0892de0a
tree db0fe88c6ad06f441320e890f6461e942b6b81e3 tree | zip | gz
parent 73ea8e4945c282d379c82a7ed440a4d65aa13ed0 view | diff
OPENDJ-1090 ECL changenumbers get reset after a purge and server restart


Never trim the newest (last) record in the ChangeNumberIndexDB from production code.
This last record contains the last published change number, which is the one that must be read on startup and used to compute the following monotonically increasing change numbers.


JEChangeNumberIndexDB.java:
Improved and fixed javadocs.
In ctor, factorized code doing twice the same thing.
In addRecord(), updated the newestChangeNumber after a newest record is committed.
In clear(DN, AtomicBoolean), updated the oldestChangeNumber + do not trim the newest record from the DB.

JEChangeNumberIndexDBTest.java:
Updated testClear() to assert the newest record is never trimmed by production code.
2 files modified
56 ■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDB.java 41 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDBTest.java 15 ●●●● diff | view | raw | blame | history