snvijaya commented on a change in pull request #1898:
URL: https://github.com/apache/hadoop/pull/1898#discussion_r686581385



##########
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:
       Its set to -1 when read fails. You will find the diff for this in 
ReadBuffer.java line 110.
   There is an issue with this commit though, for which a hotfix was made. 
Incase its relevant to your change -> 
https://issues.apache.org/jira/browse/HADOOP-17301
   Will check on your PR by EOW.




-- 
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]

Reply via email to