Fix segmented journal replay 22/80822/1
authorTomas Cere <tomas.cere@pantheon.tech>
Tue, 12 Mar 2019 09:54:47 +0000 (10:54 +0100)
committerTomas Cere <tomas.cere@pantheon.tech>
Tue, 12 Mar 2019 09:54:47 +0000 (10:54 +0100)
commita47589fdd131b1f2363b331a3dd9266a08c40a57
tree3af321c5dee402e5db66718112ee07f988c90603
parentf9bfd1462a1cb57a34a4e567c1931b629df901ea
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>
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