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

Jean-Noel Rouvignac
17.02.2013 94c4293577bdac0bd49b4c0ba3fa76e0d0b503a7
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Tuesday, September 17, 2013 15:02 +0200
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Tuesday, September 17, 2013 15:02 +0200
commit94c4293577bdac0bd49b4c0ba3fa76e0d0b503a7
tree 4c95cff851d2bd1a2ec50a1d208b09a36adba0f1 tree | zip | gz
parent 68e116f2f788894904837ec77d9c4f49e906694b view | diff
OPENDJ-1116 Introduce abstraction for the changelog DB

Investigating ExternalChangeLogTest.ECLReplicationServerFullTest(), I found a bug introduced by r9538.
In DraftCNDBCursor(long) ctor, when returning null, the code did not release the readLock anymore. Previously, it threw an exception that was caught, then released the readLock and rethrown.
Problem is there was an underlying bug in the previous code too: when the DB was already closed, the readLock would not be released at all.

Now by introducing the cursorHeld local variable, the readLock is appropriately released in the finally clause when no cursor is held at all.
Also fixed the code in DraftCNDBCursor().
1 files modified
32 ■■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDB.java 32 ●●●●● diff | view | raw | blame | history