Improve ByteBufMapper.objectToBytes() contract 56/111656/7
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 8 May 2024 05:51:31 +0000 (07:51 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 8 May 2024 23:41:09 +0000 (23:41 +0000)
commit8735cee7759f0ed21f73806673674e4c81a25719
tree7207eab0132c49f2792a6e95ada928a93d17f457
parent527547aa84eec5aabd13c8a740f786996493eb40
Improve ByteBufMapper.objectToBytes() contract

We currently treat each IOException as if it were caused by an overflow,
but other causes may exist.

Differentiate between EOFException and plain old IOException, the former
indicating an overflow.

For JournalSerdes/KryoException examine the message as there is no other
indicator.

JIRA: CONTROLLER-2115
Change-Id: I58f0de1fdb5652f0887502f610cce42395d14cae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
atomix-storage/src/main/java/io/atomix/storage/journal/ByteBufMapper.java
atomix-storage/src/main/java/io/atomix/storage/journal/JournalSegmentWriter.java
atomix-storage/src/main/java/io/atomix/storage/journal/JournalSerdes.java