Clean up SegmentedByteBufWriter.reset(long) 61/111661/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 8 May 2024 14:05:25 +0000 (16:05 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 8 May 2024 14:33:55 +0000 (16:33 +0200)
commitc2084ddca63ce3259b848d10badacf5b4738d1d1
treeb00fbc8e3095fa65fe529c34902b33c8e3a20ab9
parent794f28ea9f2c22dfb7042266b71ada659a920ab7
Clean up SegmentedByteBufWriter.reset(long)

The logic in writer reset needs to be a tad updated:

- it makes absolutely no sense to seek past last written index, unless
  we want to magically sync across multiply-open journals. We do not
  support that
- we need to realize when we are already at the correct index

JIRA: CONTROLLER-2100
Change-Id: I20b2a084c782069b893059f8d5bf535ecbbf33e3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
atomix-storage/src/main/java/io/atomix/storage/journal/SegmentedByteBufWriter.java
atomix-storage/src/test/java/io/atomix/storage/journal/AbstractJournalTest.java