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

pgamba
07.32.2009 f97c626a4abcd3f86332aeb896c051a2454e7dd0
refs
author pgamba <pgamba@localhost>
Monday, September 7, 2009 17:32 +0200
committer pgamba <pgamba@localhost>
Monday, September 7, 2009 17:32 +0200
commitf97c626a4abcd3f86332aeb896c051a2454e7dd0
tree d5c97ab20b0da87a33c4bfea337b10b3653884f3 tree | zip | gz
parent b0596e706a6443f6c6b09fefad39df41b391a6e5 view | diff
Fix for #4209 ECL: trailing changelog entries after purge can make ECL search result incoherent

Description

Example:
Using 1 suffix, 2 DSes on which write operations are done when replication is enabled.
After a given time (24 h by default config), the replication db is trimed.
Searching the ECL, returns then the latest change done for each (DS, suffix).
This result is not correct :
- because the db is supposed to be trimmed
- because it does not respect time consistency, since it contains some old changes (for example from DS1) while it does not contain some more recent changes (for example
from DS2).

Roughly, this happens because the ECL relies on the "logical" replication changelog db, and because of the triming policy of the changelog db.
With more details, the replication db is made of one db instance by (DS, suffix) tuple. Trimming the "changelog db" consists in trimming each db instance, and for each
instance to always leave at least the latest change (for some reason purely replication oriented).

The fix of the ECL consists in :
- at the beginning of the ECL search processing, getting the latest trim date from each replication server domain (stored when trim is done)
- when each change is processed, to skip it when it is older than the latest trim date of the domain.

From the above example:
Now the ECL is empty after the changelog db trimming.

Diff
Code and new unit test

4 files modified
243 ■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/replication/server/DbHandler.java 17 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java 9 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java 20 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/ExternalChangeLogTest.java 197 ●●●● diff | view | raw | blame | history