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

pgamba
19.33.2008 111c22a17e3ab4bdca9052891a810f5ab7cea6b6
refs
author pgamba <pgamba@localhost>
Wednesday, March 19, 2008 11:33 +0100
committer pgamba <pgamba@localhost>
Wednesday, March 19, 2008 11:33 +0100
commit111c22a17e3ab4bdca9052891a810f5ab7cea6b6
tree cf85346df533d2bb4ba3de2bf117fee6a09eaccd tree | zip | gz
parent fa34a95e03d6ff44745952cc37c61e68739129b0 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
opends/src/server/org/opends/server/replication/server/ReplicationBackend.java 54 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationDB.java 135 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationDbEnv.java 25 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java 8 ●●●●● diff | view | raw | blame | history
opends/tests/unit-tests-testng/src/server/org/opends/server/replication/GenerationIdTest.java 76 ●●●● diff | view | raw | blame | history