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

Jean-Noël Rouvignac
25.49.2015 14ba2a5582a448b3de3cc1eb789ff572cd62520d
refs
author Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Wednesday, November 25, 2015 09:49 +0100
committer Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Wednesday, November 25, 2015 16:10 +0100
commit14ba2a5582a448b3de3cc1eb789ff572cd62520d
tree f2997fcb23e87780ca04a8ed97a4cd573f36bb75 tree | zip | gz
parent 5cc501ce0dda6dc866e073871ada9879dda4812a view | diff
Fix deadlock in JE Storage when running unit tests

Deadlock happens because EntryContainer.clear() calls JEStorage.deleteTree() on the state index
and then calls Index.setTrusted(true) for attribute and vlv indexes (which tries to open the state index) in the same transaction.
A workaround is to remove the call to Index.setTrusted(true) since it is not neccessary (see DefaultIndex constructor)

EntryContainer.java:
In clear(), removed the calls to Index.setTrusted(true).

JEStorage.java:
In deleteTree(), catch and swallow DatabaseNotFoundException. This is acceptable because it actually means what we want to do is already done.
2 files modified
8 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/JEStorage.java 4 ●●●● diff | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/EntryContainer.java 4 ●●●● diff | view | raw | blame | history