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

Jean-Noel Rouvignac
02.47.2014 0c821707c9db6e286a6eed6f1c3baa83b8c637b9
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
commit0c821707c9db6e286a6eed6f1c3baa83b8c637b9
tree 03f65dcf51e2647b6d95f96aa7f2bbb8041bf870 tree | zip | gz
parent 84dbf0fcc1b99d31956590258ddf2aae00b0ffda 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
opends/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDB.java 41 ●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDBTest.java 15 ●●●● diff | view | raw | blame | history