jrwest commented on code in PR #3606:
URL: https://github.com/apache/cassandra/pull/3606#discussion_r1849347506


##########
src/java/org/apache/cassandra/io/util/CompressedChunkReader.java:
##########
@@ -117,8 +141,23 @@ public void readChunk(long position, ByteBuffer 
uncompressed)
                 {
                     ByteBuffer compressed = bufferHolder.getBuffer(length);
 
-                    if (channel.read(compressed, chunk.offset) != length)
-                        throw new CorruptBlockException(channel.filePath(), 
chunk);
+                    if (readAheadBuffer != null && readAheadBuffer.hasBuffer())
+                    {
+                        int copied = 0;
+                        while (copied < length) {

Review Comment:
   @rustyrazorblade @maedhroz would you prefer a boolean to turn it on and off 
and a fixed buffer size or validation to ensure its >= 256? if we go with the 
the latter we still have the chunk size / buffer size validation challenge 
because the max chunk size is 2GB



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to