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

Jean-Noel Rouvignac
17.02.2013 e51bf9ccc4c08a9f93f4e0295bd334bbd3b747ca
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
commite51bf9ccc4c08a9f93f4e0295bd334bbd3b747ca
tree 7129073c891e96b186ace7bda71b555e7f5f6ac6 tree | zip | gz
parent dd7c7aa6c2e815109b954075eaa4187748e71654 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
opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDB.java 32 ●●●●● diff | view | raw | blame | history