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

Ludovic Poitou
09.24.2011 aba87ac47f81475c93ab6f439f247176334b1ef0
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
commitaba87ac47f81475c93ab6f439f247176334b1ef0
tree 5a9cfdadc4f3e35c997f4f687b1580b2155f7713 tree | zip | gz
parent a2435ec46d9041f48870c10d0939d8d24800653a 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
opends/src/server/org/opends/server/replication/server/DbHandler.java 10 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/DraftCNDB.java 63 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/DraftCNDbHandler.java 39 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/DraftCNDbIterator.java 17 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServer.java 14 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/server/DbHandlerTest.java 3 ●●●● diff | view | raw | blame | history