From e83c85aed014f586dbc42c6b29504e40903596d8 Mon Sep 17 00:00:00 2001 From: nivy Date: Tue, 21 Jul 2026 21:32:56 -0700 Subject: [PATCH] Add exception message --- .../apache/cassandra/io/util/ThreadLocalReadAheadBuffer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/cassandra/io/util/ThreadLocalReadAheadBuffer.java b/src/java/org/apache/cassandra/io/util/ThreadLocalReadAheadBuffer.java index 57490f404a..5b55816f53 100644 --- a/src/java/org/apache/cassandra/io/util/ThreadLocalReadAheadBuffer.java +++ b/src/java/org/apache/cassandra/io/util/ThreadLocalReadAheadBuffer.java @@ -18,6 +18,7 @@ package org.apache.cassandra.io.util; +import java.io.IOException; import java.nio.ByteBuffer; import java.util.HashMap; import java.util.Map; @@ -105,7 +106,9 @@ public class ThreadLocalReadAheadBuffer implements Closeable Block block = getBlock(); ByteBuffer blockBuffer = block.buffer; if (position >= channelSize) - throw new CorruptSSTableException(null, channel.filePath()); + throw new CorruptSSTableException(new IOException(String.format("Chunk read past EOF: requested position %d must be less than file size %d", + position, channelSize)), + channel.filePath()); int blockNo = (int) (position / bufferSize); long blockPosition = blockNo * (long) bufferSize;