skoppu22 commented on code in PR #193:
URL:
https://github.com/apache/cassandra-analytics/pull/193#discussion_r3045870708
##########
cassandra-four-zero-bridge/src/test/java/org/apache/cassandra/io/util/CdcRandomAccessReaderTest.java:
##########
@@ -157,7 +157,7 @@ public void testCDCRebufferBackwardSeek() throws IOException
// Backward seek path has a bug: requests buffer.remaining() + 1
bytes
Review Comment:
Existing bug requests 1 byte extra. Looks like after this change,
CdcRandomAccessReader's rebuffer requests 2 bytes extra for backward seek case.
Assume offset is 0, buffer remaining is 50, then we will request from 0 to 51,
which will be 2 bytes extra. Don't we need to fix this code in
CdcRandomAccessReader ?
```
// attempting to read bytes previously read
// in practice we read the Commit Logs sequentially
// but we still need to respect random access reader
API, it will just require blocking
int requestLen = buffer.remaining() + 1;
long end = offset + requestLen;
BlockingStreamConsumer streamConsumer = new
BlockingStreamConsumer();
source.request(offset, end, streamConsumer);
```
--
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]