Commit 24cded1
authored
Fix hanging graceful channel shutdown by cleaning up state. (#122)
Corrects two scenarios where stale state in the load balancer could
prevent a graceful channel shutdown.
Previously, multiple endpoint updates or changes to the load balancer
could leave undiscarded subchannels or old load balancers in the
channel's state, blocking a clean shutdown.
This change ensures that previous subchannels and load balancers are
fully removed from state when they shutdown. This also corrects a
related test, which had been passing incorrectly due to an explicit
cancellation masking the issue.1 parent 4f30eed commit 24cded1
File tree
4 files changed
+29
-11
lines changed- Sources/GRPCNIOTransportCore/Client/Connection
- LoadBalancers
- Tests/GRPCNIOTransportCoreTests/Client/Connection
- LoadBalancers
4 files changed
+29
-11
lines changedLines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
837 | 845 | | |
838 | 846 | | |
839 | 847 | | |
| |||
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | 398 | | |
402 | 399 | | |
403 | 400 | | |
404 | | - | |
405 | | - | |
406 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
407 | 405 | | |
408 | 406 | | |
409 | 407 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | 622 | | |
626 | 623 | | |
627 | 624 | | |
628 | 625 | | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
629 | 630 | | |
630 | 631 | | |
631 | 632 | | |
| |||
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
| 112 | + | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
120 | 131 | | |
121 | 132 | | |
122 | 133 | | |
| |||
0 commit comments