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

Jean-Noël Rouvignac
12.32.2015 71d3697638d403df2f1d79ef3ab74af9090f3a2c
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
commit71d3697638d403df2f1d79ef3ab74af9090f3a2c
tree b84c3fdeac2fab3203db084d2f4017b00c59af7b tree | zip | gz
parent bc1073c3489843f707cedcf7f1823c75ed5d8ba4 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-server-legacy/src/main/java/org/opends/server/backends/NullBackend.java 7 ●●●●● diff | view | raw | blame | history