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

Jean-Noël Rouvignac
12.32.2015 685aec40f67dd8991aea5d7c2448125ab37dbe58
refs
author Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, October 12, 2015 14:32 +0200
committer Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, October 12, 2015 15:04 +0200
commit685aec40f67dd8991aea5d7c2448125ab37dbe58
tree 026fa8b15cc16286182ca71d4d39282701d9484c tree | zip | gz
parent 430a85f8d00465e86e59a1864931a9e8c241e4f5 view | diff
OPENDJ-2319 Replication with null backend-type does not work anymore

Replication stores the generation id in the replica's config entry if the backend is empty (it is always the case with the NulBackend).
However in LDAPReplicationDomain.loadGenerationId(), the code only checks the config entry if the search on the baseDN returns NO_SUCH_OBJECT.
But since the null backend always returns SUCCESS, the code never checks the config entry and ends with an exception
(IndexOutOfBoundsException is thrown by the code later).

By making NullBackend.search(SearchOperation) return NO_SUCH_OBJECT when searching on any of the null backend's baseDN,
we allow the LDAPReplicationDomain to start up (and insert data into the changelog),
while still allowing searches to return SUCCESS (no errors with searchRate)

NullBackend.java:
In search(), return NO_SUCH_OBJECT when searching on any of the null backend's baseDN
1 files modified
7 ■■■■■ changed files
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/backends/NullBackend.java 7 ●●●●● diff | view | raw | blame | history