mukund-thakur commented on a change in pull request #1898:
URL: https://github.com/apache/hadoop/pull/1898#discussion_r686569061
##########
File path:
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/ReadBufferManager.java
##########
@@ -253,7 +258,12 @@ private synchronized boolean tryEvict() {
}
private boolean evict(final ReadBuffer buf) {
- freeList.push(buf.getBufferindex());
+ // As failed ReadBuffers (bufferIndx = -1) are saved in completedReadList,
+ // avoid adding it to freeList.
+ if (buf.getBufferindex() != -1) {
+ freeList.push(buf.getBufferindex());
+ }
Review comment:
Hi @snvijaya
I am unable to understand the significance of this change. I couldn't find
in code anywhere where bufferIndex is set to -1 in case of read failure apart
from the default value in the class. But when the buffers initialised, they are
always set to value from 0 to 15.
Trying to understand this for https://github.com/apache/hadoop/pull/3285. So
please review that as well. Thanks.
--
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]