Commit 142e378
authored
xds: Improve shutdown handling of XdsDepManager
The most important change here is to handle subscribeToCluster() calls
after shutdown(), and preventing the internal state from being heavily
confused as the assumption is there are no watchers after shutdown().
ClusterSubscription.closed isn't strictly necessary, but I don't want
the code to depend on double-deregistration being safe.
maybePublishConfig() isn't being called after shutdown(), but adding the
protection avoids a class of bugs that would cause channel panic.1 parent 22cf7cf commit 142e378
File tree
2 files changed
+38
-7
lines changed- xds/src
- main/java/io/grpc/xds
- test/java/io/grpc/xds
2 files changed
+38
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
101 | 104 | | |
102 | | - | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
207 | 209 | | |
208 | 210 | | |
209 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
210 | 216 | | |
211 | 217 | | |
212 | 218 | | |
213 | | - | |
| 219 | + | |
214 | 220 | | |
215 | 221 | | |
216 | 222 | | |
| |||
257 | 263 | | |
258 | 264 | | |
259 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
260 | 269 | | |
261 | 270 | | |
262 | 271 | | |
| |||
293 | 302 | | |
294 | 303 | | |
295 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
296 | 310 | | |
297 | 311 | | |
298 | 312 | | |
| |||
557 | 571 | | |
558 | 572 | | |
559 | 573 | | |
560 | | - | |
561 | | - | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
562 | 577 | | |
563 | 578 | | |
564 | | - | |
| 579 | + | |
565 | 580 | | |
566 | 581 | | |
567 | | - | |
| 582 | + | |
568 | 583 | | |
569 | 584 | | |
570 | 585 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
848 | 848 | | |
849 | 849 | | |
850 | 850 | | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
851 | 867 | | |
852 | 868 | | |
853 | 869 | | |
| |||
0 commit comments