[ 
https://issues.apache.org/jira/browse/HDFS-15723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiaoqiao He updated HDFS-15723:
-------------------------------
    Description: 
My colleague report that the following code segment has wrong parameter passed 
when create RemoteLocation instance at RouterRpcClient#invokeConcurrent 
(Collection<T>, RemoteMethod, boolean, long, Class<R>).
{code:java}
      if (standby) {
        // Call the objectGetter to all NNs (including standby)
        for (final FederationNamenodeContext nn : namenodes) {
          String nnId = nn.getNamenodeId();
          final List<FederationNamenodeContext> nnList =
              Collections.singletonList(nn);
          T nnLocation = location;
          if (location instanceof RemoteLocation) {
            nnLocation = (T)new RemoteLocation(nsId, nnId, location.getDest()); 
<-- wrong parameter passed.
          }
          orderedLocations.add(nnLocation);
          callables.add(
              () -> {
                transferThreadLocalContext(originCall, originContext);
                return invokeMethod(ugi, nnList, proto, m, paramList);
              });
        }
      }
{code}

  was:
My colleague report that the following code segment has wrong parameter passed 
when create RemoteLocation instance.
{code:java}
      if (standby) {
        // Call the objectGetter to all NNs (including standby)
        for (final FederationNamenodeContext nn : namenodes) {
          String nnId = nn.getNamenodeId();
          final List<FederationNamenodeContext> nnList =
              Collections.singletonList(nn);
          T nnLocation = location;
          if (location instanceof RemoteLocation) {
            nnLocation = (T)new RemoteLocation(nsId, nnId, location.getDest()); 
<-- wrong parameter passed.
          }
          orderedLocations.add(nnLocation);
          callables.add(
              () -> {
                transferThreadLocalContext(originCall, originContext);
                return invokeMethod(ugi, nnList, proto, m, paramList);
              });
        }
      }
{code}


> RBF: invokeConcurrent may run unexpected when enable standby read
> -----------------------------------------------------------------
>
>                 Key: HDFS-15723
>                 URL: https://issues.apache.org/jira/browse/HDFS-15723
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: rbf
>            Reporter: Xiaoqiao He
>            Assignee: Xiaoqiao He
>            Priority: Major
>         Attachments: HDFS-15723.001.patch
>
>
> My colleague report that the following code segment has wrong parameter 
> passed when create RemoteLocation instance at 
> RouterRpcClient#invokeConcurrent (Collection<T>, RemoteMethod, boolean, long, 
> Class<R>).
> {code:java}
>       if (standby) {
>         // Call the objectGetter to all NNs (including standby)
>         for (final FederationNamenodeContext nn : namenodes) {
>           String nnId = nn.getNamenodeId();
>           final List<FederationNamenodeContext> nnList =
>               Collections.singletonList(nn);
>           T nnLocation = location;
>           if (location instanceof RemoteLocation) {
>             nnLocation = (T)new RemoteLocation(nsId, nnId, 
> location.getDest()); <-- wrong parameter passed.
>           }
>           orderedLocations.add(nnLocation);
>           callables.add(
>               () -> {
>                 transferThreadLocalContext(originCall, originContext);
>                 return invokeMethod(ugi, nnList, proto, m, paramList);
>               });
>         }
>       }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to