You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/09/07 15:22:00 UTC
[jira] [Commented] (HDFS-17567) Return value of method RouterRpcClient#invokeSequential is not accurate
[ https://issues.apache.org/jira/browse/HDFS-17567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17880052#comment-17880052 ]
ASF GitHub Bot commented on HDFS-17567:
---------------------------------------
KeeProMise commented on code in PR #6923:
URL: https://github.com/apache/hadoop/pull/6923#discussion_r1748371835
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java:
##########
@@ -1175,6 +1177,7 @@ public <R extends RemoteLocationContext, T> RemoteResult invokeSequential(
}
// Return the first result, whether it is the value or not
@SuppressWarnings("unchecked") T ret = (T) firstResult;
+ @SuppressWarnings("unchecked") R loc = (R) firstLocation;
return new RemoteResult<>(locations.get(0), ret);
Review Comment:
Hi, @hfutatzhanghb According to your explanation, maybe this should be changed to:
```java
@SuppressWarnings("unchecked") R loc = (R) firstLocation;
return new RemoteResult<>(loc, ret);
```
> Return value of method RouterRpcClient#invokeSequential is not accurate
> -----------------------------------------------------------------------
>
> Key: HDFS-17567
> URL: https://issues.apache.org/jira/browse/HDFS-17567
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: rbf
> Affects Versions: 3.4.0
> Reporter: farmmamba
> Assignee: farmmamba
> Priority: Major
> Labels: pull-request-available
>
> Below code is the return value in method RouterRpcClient#invokeSequential.
>
> {code:java}
> // Return the first result, whether it is the value or not
> @SuppressWarnings("unchecked") T ret = (T) firstResult;
> return new RemoteResult<>(locations.get(0), ret); {code}
>
>
> `locations.get(0)` is not accurate, because it may not be the remote location where ret was returned.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org