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

Jean-Noel Rouvignac
05.07.2013 1d15200b509c239186ff5bfbe2ef195b82715571
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, December 5, 2013 11:07 +0100
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, December 5, 2013 11:07 +0100
commit1d15200b509c239186ff5bfbe2ef195b82715571
tree 884cbd3f63d81d432e8f23fa17201f3028b7538d tree | zip | gz
parent 12097fce59cad975728a37b81b3a3e6a2aa1bccf view | diff
#2 Fixed a readWriteLock deadlock happening in tests on calling ChangelogDB.removeDB() which then calls ReplicationDB.shutdown().
Code is blocked acquiring a writeLock on the dbCloseLock, but a readLock is never unlocked.
Debugging showed that the ChangeNumberIndexDB is holding a cursor on a ReplicationDB, said cursor holds the readLock.
Despite the ChangeNumberIndexer thread being asked to initiateShutdown(), the thread is waiting indefinitely for new changes which will never come.

DirectoryThread.java:
In initiateShutdown(), call interrupt() to ensure the thread will be interrupted if it calls Object.wait() before checking whether it needs to shutdown, or if it is already waiting.
1 files modified
1 ■■■■ changed files
opends/src/server/org/opends/server/api/DirectoryThread.java 1 ●●●● diff | view | raw | blame | history