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

Jean-Noel Rouvignac
22.08.2015 b76926534880aff32c7ebcffa054f9fd71107fb1
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, January 22, 2015 12:08 +0100
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, January 22, 2015 12:08 +0100
commitb76926534880aff32c7ebcffa054f9fd71107fb1
tree bbb2d1a4621aaeaeead940fc0cb45ff2119d5dfd tree | zip | gz
parent 58eaa8f70c3beff90d1ed88ecc1e3e7af91671ed view | diff
OPENDJ-1753 NPE when deleting backend index on an attribute index


Problem was due to incorrect caching of Exchange objects in the PersistItStorage class.
Problem is too complex to explain easily in a few words, but here is what needs to be said about it:
PersistItStorage.StorageImpl.deleteTree() correctly calls Persistit.releaseExchange(), but fails to remove the cached object in PersistItStorage.StorageImpl.exchanges Map field.
This puts the transaction in an invalid state, particularly for the State index, which then later triggers the NPE when the Exchange object is shared accross index objects.


PersistItStorage.java:
In deleteTree(), remove the Exchange object from the transaction local cache before releasing it back to PersistIt.
Renamed getExchange() and getExchange0() to getExchangeFromCache() and getNewExchange().
1 files modified
40 ■■■■ changed files
opendj3-server-dev/src/server/org/opends/server/backends/persistit/PersistItStorage.java 40 ●●●● diff | view | raw | blame | history