Skip to content

pubsub: start subscriber connections quickly again#2104

Merged
pongad merged 1 commit intogoogleapis:masterfrom
pongad:fix-subscribe
Jun 6, 2017
Merged

pubsub: start subscriber connections quickly again#2104
pongad merged 1 commit intogoogleapis:masterfrom
pongad:fix-subscribe

Conversation

@pongad
Copy link
Copy Markdown
Contributor

@pongad pongad commented Jun 1, 2017

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.

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.
@pongad pongad requested a review from garrettjonesgoogle June 1, 2017 03:47
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 1, 2017
@coveralls
Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling 07f1c28 on pongad:fix-subscribe into ** on GoogleCloudPlatform:master**.

* is provided a shared one will be used by all {@link Subscriber} instances.
*/
public Builder setLeaseAlarmsExecutorProvider(ExecutorProvider executorProvider) {
public Builder setSystemExecutorProvider(ExecutorProvider executorProvider) {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@garrettjonesgoogle
Copy link
Copy Markdown
Contributor

LGTM

@pongad pongad merged commit 65d5aad into googleapis:master Jun 6, 2017
@pongad pongad deleted the fix-subscribe branch June 6, 2017 00:11
chingor13 pushed a commit that referenced this pull request Feb 20, 2026
* feat: Adding setting KeepAlive to JsonWriter sample

* .

* .

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants