lukasz-antoniak commented on code in PR #173:
URL:
https://github.com/apache/cassandra-analytics/pull/173#discussion_r2844738324
##########
cassandra-five-zero-bridge/src/main/java/org/apache/cassandra/io/util/ReadOnlyInputStreamFileChannel.java:
##########
@@ -54,7 +54,7 @@ public int read(ByteBuffer dst) throws IOException
if (dst.position() == 0 && dst.limit() > 0)
{
// o.a.c.io.util.SimpleChunkReader flips the buffer, so position
should be set to the end.
- dst.position(read);
+ dst.position(Math.min(read, dst.limit()));
Review Comment:
If I think about it again, you might be right. Wanted to be more defensive
coding, but this should not happen. This is a NIT outside scope of this PR. I
have observed it only when testing with DS Cassandra, not OSS. Reverting.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]