snvijaya commented on a change in pull request #3110: URL: https://github.com/apache/hadoop/pull/3110#discussion_r663552686
########## File path: hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsInputStream.java ########## @@ -207,6 +215,28 @@ public synchronized int read(final byte[] b, final int off, final int len) throw } incrementReadOps(); do { + + // limit is the maximum amount of data present in buffer. + // fCursor is the current file pointer. Thus maximum we can + // go back and read from buffer is fCursor - limit. + // There maybe case that we read less than requested data. + long bytesPresentInBuffer = fCursor - limit; Review comment: Rename bytesPresentInBuffer to filePosAtStartOfBuffer -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org