Cap index to sequenceNr before tryNext() 70/111470/3
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 21 Apr 2024 12:04:40 +0000 (14:04 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 21 Apr 2024 17:56:11 +0000 (19:56 +0200)
commitf2a918522421164b7ca3cc06e1863cd30f759a5f
treebcea911d9cba9e6906170218c477321a4d347976
parenta35bb2b0d7c688eaa83c38996373b1784e513694
Cap index to sequenceNr before tryNext()

Rather than relying on Indexed.index(), which requires us to attempt to
read the next entry, use a simple getNextIndex() check.

JIRA: CONTROLLER-2115
Change-Id: Id1d7638dda0d909b8383af8f1e201fb9e7f192e0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-akka-segmented-journal/src/main/java/org/opendaylight/controller/akka/segjournal/DataJournalV0.java