Improve disk entry access 10/110810/5
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 17 Mar 2024 11:22:10 +0000 (12:22 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 20 Mar 2024 08:03:36 +0000 (09:03 +0100)
commitffa5f509ead53e7867ceeae9594e6b9906cf5da6
tree1649caf2dfd51954a7b39e989c1048211ec07ef4
parentb73237d7cfc9067dbeaed9dc7c602ee78884d002
Improve disk entry access

Eliminate superfluous compactions while a complete entry is available.
This is done by carefully looking at the buffer and figuring out how
many bytes we actually need progress.

JIRA: CONTROLLER-2109
Change-Id: If091b5c6f74da6a989629dae49137ed492725e2d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
atomix-storage/src/main/java/io/atomix/storage/journal/DiskJournalSegmentWriter.java
atomix-storage/src/test/java/io/atomix/storage/journal/DiskJournalSegmentWriterTest.java [new file with mode: 0644]