Commit a049999
authored
fix: use a new managed channel builder when creating channels (#13684)
ChannelPoolDpImpl calls the channel supplier many times over a pool's
lifetime — at warm-up, on load-driven resize, on capacity misses in
newStream, and on channel recycles.
gRPC builders are mutating: intercept(...) appends to an internal list,
and build() snapshots the current list into the new channel. So if
anything installs an interceptor on the shared builder between builds,
that interceptor accumulates. If the interceptor includes any headers,
this causes all the headers to accumulate.1 parent 1c395d1 commit a049999
2 files changed
Lines changed: 389 additions & 8 deletions
File tree
- java-bigtable/google-cloud-bigtable/src
- main/java/com/google/cloud/bigtable/data/v2/internal/channels
- test/java/com/google/cloud/bigtable/data/v2/internal/channels
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
190 | 189 | | |
191 | 190 | | |
192 | 191 | | |
193 | | - | |
194 | | - | |
| 192 | + | |
195 | 193 | | |
196 | 194 | | |
197 | 195 | | |
198 | 196 | | |
199 | | - | |
| 197 | + | |
200 | 198 | | |
201 | 199 | | |
202 | 200 | | |
203 | 201 | | |
204 | 202 | | |
205 | 203 | | |
206 | 204 | | |
207 | | - | |
| 205 | + | |
208 | 206 | | |
209 | 207 | | |
210 | 208 | | |
211 | 209 | | |
212 | 210 | | |
213 | | - | |
214 | | - | |
215 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
216 | 217 | | |
217 | 218 | | |
0 commit comments