arjunashok commented on PR #193: URL: https://github.com/apache/cassandra-analytics/pull/193#issuecomment-4179854913
Seems like `FileSystemSource.request()` has a workaround (lines 94–99) that was compensating for the old off-by-one in `BufferingInputStream.requestMore()`. Comment in line 97: "Start-end range is inclusive but on the final request end == length so we need to exclude". With this fix, end is now at most `source.size() - 1`, and length equals source.size(), so `length <= end` is always false. As a result - 1. the code always takes the `increment = 1` path, which happens to produce the correct end - start + 1, so no data corruption, but it's confusing dead code. 2. More importantly, `close` is never true, so the autoClose path in the finally block never triggers. For sequential reads via FileSystemSSTable (non-BTI format, where autoClose = true), the RandomAccessFile handle is never closed after the last chunk, which is a file descriptor leak. -- 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]
