mccormickt12 commented on code in PR #5322:
URL: https://github.com/apache/hadoop/pull/5322#discussion_r1107919545


##########
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java:
##########
@@ -1337,7 +1352,11 @@ private void hedgedFetchBlockByteRange(LocatedBlock 
block, long start,
         } catch (InterruptedException ie) {
           // Ignore and retry
         }
-        if (refetch) {
+        // if refetch is true then all nodes are in deadlist or ignorelist
+        // we should loop through all futures and remove them so we do not

Review Comment:
   fixed comments. deadlist is actually deadNodes (I fixed that comment as 
well.)
   When connections fail (in both hedged and non hedged code path) nodes are 
added to the deadNodes collection to try other nodes. Once `chooseDataNode` 
returns `null` (or more accurately `getBestNodeDNAddrPair`) it calls 
`refetchLocations` which clears the deadNodes `clearLocalDeadNodes()` and now 
with my change, also clears the ignore list. 
   
   Note we have added an assumption to this method `refetchLocations`. The 
comment I added to `refetchLocations`
   ``` 
    /**
      * RefetchLocations should only be called when there are no active requests
      * to datanodes. In the hedged read case this means futures should be empty
      */
      ```



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

Reply via email to