Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDFS-17567. Return value of method RouterRpcClient#invokeSequential is not accurate. #6923

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

hfutatzhanghb
Copy link
Contributor

@hfutatzhanghb hfutatzhanghb commented Jul 4, 2024

Description of PR

Below code is the return value in method RouterRpcClient#invokeSequential.

// Return the first result, whether it is the value or not
@SuppressWarnings("unchecked") T ret = (T) firstResult;
return new RemoteResult<>(locations.get(0), ret); 

locations.get(0) is not accurate, because it may not be the remote location where ret was returned.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 0s Docker mode activated.
-1 ❌ docker 0m 10s Docker failed to build run-specific yetus/hadoop:tp-21977}.
Subsystem Report/Notes
GITHUB PR #6923
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6923/1/console
versions git=2.34.1
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Member

@ayushtkn ayushtkn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't catch this... you need to extend a test for the case.
ret is the firstResult & locations.get(0) will be the first location where the method will be invoked, how it is wrong?

@hfutatzhanghb
Copy link
Contributor Author

Member

@ayushtkn Sir, IIUC. suppose we have locations with three nameservices (ns1, ns2, ns3), when we invoke RPC targeting to ns1, it raised exception and we invoke RPC successfully targeting to ns2. This time the firstResult would be the return value of ns2.
So it does not match with locations.get(0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants