[ 
https://issues.apache.org/jira/browse/HDFS-16359?focusedWorklogId=687558&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-687558
 ]

ASF GitHub Bot logged work on HDFS-16359:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Nov/21 19:24
            Start Date: 29/Nov/21 19:24
    Worklog Time Spent: 10m 
      Work Description: goiri commented on a change in pull request #3731:
URL: https://github.com/apache/hadoop/pull/3731#discussion_r758668281



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java
##########
@@ -726,9 +727,10 @@ static String getMethodName() {
    * @return List of name spaces in the federation on
    * removing the already invoked namespaceinfo.
    */
-  private Set<FederationNamespaceInfo> getNameSpaceInfo(String nsId) {
+  private Set<FederationNamespaceInfo> getNameSpaceInfo(
+      Set<FederationNamespaceInfo> nss, String nsId) {
     Set<FederationNamespaceInfo> namespaceInfos = new HashSet<>();
-    for (FederationNamespaceInfo ns : namespaceInfos) {
+    for (FederationNamespaceInfo ns : nss) {

Review comment:
       Very good catch.
   
   Catching the issue with the log is fine but I think there must be an easier 
way to test that the feature works.
   Is there any other unit test we can add?




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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 687558)
    Time Spent: 1h 10m  (was: 1h)

> RBF: RouterRpcServer#invokeAtAvailableNs does not take effect when retrying
> ---------------------------------------------------------------------------
>
>                 Key: HDFS-16359
>                 URL: https://issues.apache.org/jira/browse/HDFS-16359
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: tomscut
>            Assignee: tomscut
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> RouterRpcServer#invokeAtAvailableNs does not take effect when retrying. See 
> HDFS-15543.
> The original code of RouterRpcServer#getNameSpaceInfo looks like this:
> {code:java}
> private Set<FederationNamespaceInfo> getNameSpaceInfo(String nsId) {
>   Set<FederationNamespaceInfo> namespaceInfos = new HashSet<>();
>   for (FederationNamespaceInfo ns : namespaceInfos) {
>     if (!nsId.equals(ns.getNameserviceId())) {
>       namespaceInfos.add(ns);
>     }
>   }
>   return namespaceInfos;
> }  {code}
> And _namespaceInfos_ is always empty here.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to