71d3697638d403df2f1d79ef3ab74af9090f3a2c |
|
12-Oct-2015 |
Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com> |
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 |