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

pgamba
19.33.2008 3254d0089701cbf24c06cc019def174b13628923
refs
author pgamba <pgamba@localhost>
Wednesday, March 19, 2008 11:33 +0100
committer pgamba <pgamba@localhost>
Wednesday, March 19, 2008 11:33 +0100
commit3254d0089701cbf24c06cc019def174b13628923
tree 29d8ded370c1403fc502d937456953282d98ff97 tree | zip | gz
parent 65da7a7def514f1c3290da6c901852bbdb1539ae view | diff
The following changes fix a bug in the clearing of the replication server db that make the clearing sometimes fail silently .
Particularly Berkeley DB requires to close the db and any reference to the db handle released before to truncate the db.
That requires to lock the db when it is closed/cleared with a limited impact on the performances in the other cases.
A RW lock is added on the db : every thread using the db takes/releases the READ lock before /after usage. That still allow these threads to run concurrently and prevent a big impact on performances. Every thread closing the db
(shutdown or clear) takes/releases the WRITE lock before/after the closure.

The changes also include a fix on the search scope processing in the replication backend.

Test:
------
In addition, the generation ID unit test has been improved with some check on the replication server db content that go through these 2 fixes. Successfully ran nightly build.

5 files modified
298 ■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java 54 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationDB.java 135 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationDbEnv.java 25 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java 8 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/GenerationIdTest.java 76 ●●●● diff | view | raw | blame | history