You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "mccormickt12 (via GitHub)" <gi...@apache.org> on 2023/02/16 01:42:20 UTC

[GitHub] [hadoop] mccormickt12 commented on a diff in pull request #5322: HDFS-16896 clear ignoredNodes list when we clear deadnode list on ref…

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-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org