Commit 65d5aad
authored
pubsub: start subscriber connections quickly again (#2104)
This PR undoes part of #2055.
Refreshing credentials blocks thread for a period of time.
Previously, each channel has its own credentials,
so starting many channels spams executor with many blocking tasks.
but the downside is we take a long time to fully start:
about 2 minutes on my machine.
Now, all connections share the same credentials,
so refreshing only happens once.
We can start quickly again.
Also rename setLeaseAlarmsExecutorProvider,
since the executor is now also used for polling.1 parent c4c80f5 commit 65d5aad
2 files changed
Lines changed: 8 additions & 7 deletions
File tree
- google-cloud-pubsub/src
- main/java/com/google/cloud/pubsub/spi/v1
- test/java/com/google/cloud/pubsub/spi/v1
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
339 | | - | |
340 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
341 | 342 | | |
342 | 343 | | |
343 | 344 | | |
| |||
468 | 469 | | |
469 | 470 | | |
470 | 471 | | |
471 | | - | |
472 | | - | |
| 472 | + | |
| 473 | + | |
473 | 474 | | |
474 | | - | |
| 475 | + | |
475 | 476 | | |
476 | 477 | | |
477 | 478 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | | - | |
| 539 | + | |
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
| |||
0 commit comments