Reduce position changes during read 68/110568/2
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 9 Mar 2024 14:29:56 +0000 (15:29 +0100)
committerRobert Varga <nite@hq.sk>
Mon, 11 Mar 2024 12:51:11 +0000 (12:51 +0000)
commitfe1081dadbe4aa27600ef4454bbad5357f50e331
tree1ef9a587e89c2c9616f38c4cc115021218d0164c
parent62351d41be04a723dce6c1268475f27a0ca0dfe6
Reduce position changes during read

Rather than using a read() which updates the position, requiring us to
set the position again, set it only once and use read with offset --
eliminating one syscall.

JIRA: CONTROLLER-2095
Change-Id: I478ba1cbb1f5737a751b43cb6ed0d018e49e6485
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
atomix-storage/src/main/java/io/atomix/storage/journal/FileChannelJournalSegmentWriter.java