Skip to content

Conversation

@twz123
Copy link
Contributor

@twz123 twz123 commented Dec 5, 2025

Goroutines spawned during balancer swaps could outlive the call to Balancer.Close(). Monitor these via a wait group and wait for them to finish before returning from Close(). This prevents any noticeable side effects that could otherwise occur after Close() returns.

See:

RELEASE NOTES:

  • client: Closing a graceful switch balancer will now block until all pending goroutines complete.

Goroutines spawned during balancer swaps could outlive the call to
Balancer.Close(). Monitor these via a wait group and wait for them to
finish before returning from Close(). This prevents any noticeable side
effects that could otherwise occur after Close() returns.

RELEASE NOTES:
- Closing a graceful switch balancer will now block until all pending
  goroutines complete.

Signed-off-by: Tom Wieczorek <[email protected]>
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.30%. Comparing base (647162c) to head (118c31b).
⚠️ Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8746      +/-   ##
==========================================
- Coverage   83.38%   83.30%   -0.08%     
==========================================
  Files         418      418              
  Lines       32367    32371       +4     
==========================================
- Hits        26988    26968      -20     
+ Misses       4014     4011       -3     
- Partials     1365     1392      +27     
Files with missing lines Coverage Δ
internal/balancer/gracefulswitch/gracefulswitch.go 72.41% <100.00%> (-14.06%) ⬇️

... and 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mbissa mbissa added the Type: Feature New features or improvements in behavior label Dec 9, 2025
@mbissa mbissa added this to the 1.78 Release milestone Dec 9, 2025
@eshitachandwani eshitachandwani merged commit 9b990b6 into grpc:master Dec 11, 2025
15 of 17 checks passed
@twz123 twz123 deleted the clientconn-close-waitfor-goroutines-graceful_switch branch December 11, 2025 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Feature New features or improvements in behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants