Standardize UpstreamGrpcSender shutdown to await channel termination#8624
Draft
thswlsqls wants to merge 1 commit into
Draft
Standardize UpstreamGrpcSender shutdown to await channel termination#8624thswlsqls wants to merge 1 commit into
thswlsqls wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8624 +/- ##
============================================
- Coverage 91.60% 91.60% -0.01%
- Complexity 10343 10345 +2
============================================
Files 1013 1013
Lines 27352 27365 +13
Branches 3215 3216 +1
============================================
+ Hits 25057 25068 +11
- Misses 1567 1569 +2
Partials 728 728 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #8280
Description
shutdown()calledchannel.shutdownNow()and returnedofSuccess()right away, signalling completion before the channel had terminated.OkHttpHttpSender, standardized in Standardize OkHttpHttpSender shutdown to await executor termination #8495.cancelAll()/evictAll()unconditionally, butManagedChannelhas no API to cancel in-flight RPCs without closing the channel, so there is no counterpart here.executorfield is left alone: it comes fromExtendedGrpcSenderConfig.getExecutorService()and is caller-owned.JdkHttpSenderremains in Standardize sender shutdown implementations #8280, so this PR does not close it.Testing done
UpstreamGrpcSenderTest:shutdown_ManagedChannel_WaitsForChannelTermination,shutdown_UnmanagedChannel_ReturnsImmediatelyAndLeavesChannelOpen,shutdown_ChannelDoesNotTerminateInTime_Succeeds. A fakeManagedChannelcontrols termination timing. The first fails against the previous implementation../gradlew :exporters:sender:grpc-managed-channel:check— 3 tests passed. The module had no test source set before; no build script change needed.internalpackage, signature unchanged, matching Standardize OkHttpHttpSender shutdown to await executor termination #8495.