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

[MINOR] fix(spark-client) Close coordinator client in time #2328

Merged
merged 8 commits into from
Jan 7, 2025

Conversation

maobaolong
Copy link
Member

What changes were proposed in this pull request?

Close coordinator client in time.

Why are the changes needed?

Grpc retry will throw exception for all the time.

[16:44:57:437] [grpc-default-executor-0] WARN  org.apache.uniffle.shaded.io.grpc.internal.ManagedChannelImpl.handleErrorInSyncContext:1866 - [Channel<1>: (a:10000)] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host a, cause=java.lang.RuntimeException: java.net.UnknownHostException: a: 未知的名称或服务
    at org.apache.uniffle.shaded.io.grpc.internal.DnsNameResolver.resolveAddresses(DnsNameResolver.java:223)
    at org.apache.uniffle.shaded.io.grpc.internal.DnsNameResolver.doResolve(DnsNameResolver.java:282)
    at org.apache.uniffle.shaded.io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:318)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
Caused by: java.net.UnknownHostException: a: 未知的名称或服务
    at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:867)
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1302)
    at java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:815)
    at java.net.InetAddress.getAllByName0(InetAddress.java:1291)
    at java.net.InetAddress.getAllByName(InetAddress.java:1144)
    at java.net.InetAddress.getAllByName(InetAddress.java:1065)
    at org.apache.uniffle.shaded.io.grpc.internal.DnsNameResolver$JdkAddressResolver.resolveAddress(DnsNameResolver.java:632)
    at org.apache.uniffle.shaded.io.grpc.internal.DnsNameResolver.resolveAddresses(DnsNameResolver.java:219)
    ... 5 more

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing UTs.

```
[16:44:57:437] [grpc-default-executor-0] WARN  org.apache.uniffle.shaded.io.grpc.internal.ManagedChannelImpl.handleErrorInSyncContext:1866 - [Channel<1>: (a:10000)] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host a, cause=java.lang.RuntimeException: java.net.UnknownHostException: a: 未知的名称或服务
	at org.apache.uniffle.shaded.io.grpc.internal.DnsNameResolver.resolveAddresses(DnsNameResolver.java:223)
	at org.apache.uniffle.shaded.io.grpc.internal.DnsNameResolver.doResolve(DnsNameResolver.java:282)
	at org.apache.uniffle.shaded.io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:318)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
Caused by: java.net.UnknownHostException: a: 未知的名称或服务
	at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
	at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:867)
	at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1302)
	at java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:815)
	at java.net.InetAddress.getAllByName0(InetAddress.java:1291)
	at java.net.InetAddress.getAllByName(InetAddress.java:1144)
	at java.net.InetAddress.getAllByName(InetAddress.java:1065)
	at org.apache.uniffle.shaded.io.grpc.internal.DnsNameResolver$JdkAddressResolver.resolveAddress(DnsNameResolver.java:632)
	at org.apache.uniffle.shaded.io.grpc.internal.DnsNameResolver.resolveAddresses(DnsNameResolver.java:219)
	... 5 more
```
Copy link

github-actions bot commented Jan 5, 2025

Test Results

 2 966 files  ±0   2 966 suites  ±0   6h 26m 25s ⏱️ -53s
 1 100 tests ±0   1 098 ✅ ±0   2 💤 ±0  0 ❌ ±0 
13 774 runs  ±0  13 744 ✅ ±0  30 💤 ±0  0 ❌ ±0 

Results for commit e414e2e. ± Comparison against base commit 3b0521a.

♻️ This comment has been updated with latest results.

@codecov-commenter
Copy link

codecov-commenter commented Jan 5, 2025

Codecov Report

Attention: Patch coverage is 0% with 30 lines in your changes missing coverage. Please review.

Project coverage is 51.56%. Comparing base (580b4f2) to head (e414e2e).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
...org/apache/spark/shuffle/RssSparkShuffleUtils.java 0.00% 11 Missing ⚠️
...park/shuffle/DelegationRssShuffleManagerUtils.java 0.00% 9 Missing ⚠️
...ient/impl/grpc/CoordinatorGrpcRetryableClient.java 0.00% 8 Missing ⚠️
...iffle/client/factory/CoordinatorClientFactory.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2328      +/-   ##
============================================
+ Coverage     51.19%   51.56%   +0.36%     
- Complexity     2936     2973      +37     
============================================
  Files           486      475      -11     
  Lines         24720    22706    -2014     
  Branches       2041     2093      +52     
============================================
- Hits          12656    11708     -948     
+ Misses        11274    10253    -1021     
+ Partials        790      745      -45     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@maobaolong maobaolong closed this Jan 5, 2025
@maobaolong maobaolong reopened this Jan 5, 2025
@maobaolong maobaolong merged commit b2d060a into apache:master Jan 7, 2025
68 of 85 checks passed
@maobaolong
Copy link
Member Author

@jerqi Thanks for your review. Merged.

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

Successfully merging this pull request may close these issues.

3 participants