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

Ludovic Poitou
09.24.2011 5c87cce021cba14003f8371f8e496aefe68724bc
refs
author Ludovic Poitou <ludovic.poitou@forgerock.com>
Thursday, June 9, 2011 23:24 +0200
committer Ludovic Poitou <ludovic.poitou@forgerock.com>
Thursday, June 9, 2011 23:24 +0200
commit5c87cce021cba14003f8371f8e496aefe68724bc
tree 0597015b5f6ee674d72d4d2ff55c28934804c975 tree | zip | gz
parent 0b7ca11e87dcd5b1fb1ada7529cff87fb97aa177 view | diff
Fix issue OPENDJ-67: Investigate ECL change number consistency across replications servers which have been subjected to different purging policies.

The issue of ECL change number inconsistency across servers is not tied to purging policies but to the fact that the CN is based on a lazy built index. As a result, the last change number in the index database depends on when Searches are done against the server and not what are really the changes available. The lastChangeNumber virtual attribute uses the index last CN and adds the changes received and eligible.

The changes here are of fixing the following :
After purging of the DraftCNDB, the next value will be incremented from last known value. As a result, changeNumbers are always increasing. Purging the DraftCNDB is now stopping at the first index that still points to a valid change in the changelog. The counter of changes has been fixed to take into account the fact that the changelog keeps at least one change older than the trim age in order to preserve the validity of the Cookie for at least "purge delay".
Also contains some optimization of the DraftCNDBCursor to avoid reading the entries pointed by the cursor several times.
6 files modified
146 ■■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/replication/server/DbHandler.java 10 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/DraftCNDB.java 63 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/DraftCNDbHandler.java 39 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/DraftCNDbIterator.java 17 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServer.java 14 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/DbHandlerTest.java 3 ●●●● diff | view | raw | blame | history