Fix segmented journal replay 09/81009/1
authorTomas Cere <tomas.cere@pantheon.tech>
Tue, 12 Mar 2019 09:54:47 +0000 (10:54 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 19 Mar 2019 14:52:52 +0000 (15:52 +0100)
commitfe6e0d5cf3487a7afda84fd78946e467824fe30f
tree1fce0e14007631addc95c39f017acafcda96fd17
parent11f5c86481fcb899bd55538c00ad0af058fffb59
Fix segmented journal replay

lastDelete was getting set with the incorrect value from the delete journal.
The actual written value from the delete journal needs to be used
instead of the index.
dataJournal compact also needs to be compacted upto lastDelete + 1 since
deleteUpTo is inclusive and compact keeps this value around.

Change-Id: I4a678be67fd1ad09c57273ef0fc3b7398a7d714f
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
(cherry picked from commit a47589fdd131b1f2363b331a3dd9266a08c40a57)
opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/SegmentedJournalActor.java
opendaylight/md-sal/sal-akka-segmented-journal/src/test/java/org/opendaylight/controller/akka/segjournal/SegmentedFileJournalTest.java