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

Jean-Noel Rouvignac
23.42.2013 62a518f7d2b432b072de8fdbb97976fb257953cb
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, December 23, 2013 19:42 +0100
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, December 23, 2013 19:42 +0100
commit62a518f7d2b432b072de8fdbb97976fb257953cb
tree 2a62940d6c89df1d9e3b8032bd9aa9ae1225e48c tree | zip | gz
parent eeb2e4f0a3ddfdf3ae9ab8fe3be4f824566f0e8d view | diff
OPENDJ-1262 NPE in ChangeNumberIndex during server startup


The problem was due to incorrect code factorization around cursor creation:
When creating the cursors, the startAfterCSN to use in different depending on where we come from:
- during ChangeNumberIndexer initialization, the cursors are already created from the previous cookie, so the provided CSN is the one to use
- on publishUpdateMsg(), we want the cursor to start exactly with the provided CSN, so we need to create the cursor with the immediately preceding CSN.


ChangeNumberIndexer.java:
In ensureCursorExists(), added boolean parameter startFromPrecedingCSN.
Added lots of comments.
1 files modified
21 ■■■■■ changed files
opends/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexer.java 21 ●●●●● diff | view | raw | blame | history