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

Jean-Noel Rouvignac
23.42.2013 18e66665f4b812c42b671526eab34379edca0786
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
commit18e66665f4b812c42b671526eab34379edca0786
tree cafe0a893b71b71767345c9a33e819e577729af0 tree | zip | gz
parent 0f7f7b8d5e655ccd36aca7d9a3c425dfcd23ad62 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
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/je/ChangeNumberIndexer.java 21 ●●●●● diff | view | raw | blame | history