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

Jean-Noel Rouvignac
22.08.2015 e14218f31c778d776b3311f6e2b30ff1aa6f7974
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
commite14218f31c778d776b3311f6e2b30ff1aa6f7974
tree 291f916da532c495fdcfe2aa7574205602ed5561 tree | zip | gz
parent 47d26db367b84992e3405d19cd209d1103de9aa1 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
opendj-sdk/opendj3-server-dev/src/server/org/opends/server/backends/persistit/PersistItStorage.java 40 ●●●● diff | view | raw | blame | history