Skip to content

pubsub: move polling task to alarm executor#2079

Merged
pongad merged 3 commits intogoogleapis:masterfrom
pongad:mv-exec
May 28, 2017
Merged

pubsub: move polling task to alarm executor#2079
pongad merged 3 commits intogoogleapis:masterfrom
pongad:mv-exec

Conversation

@pongad
Copy link
Copy Markdown
Contributor

@pongad pongad commented May 22, 2017

"alarm executor".
This commit moves polling tasks to the same executor,
and give the said executor more threads
to handle the extra workload.

This commit puts all client's "house keeping" tasks in one executor,
and all user code in another.
In this way, long running user code cannot starve the client of CPU.

cc @davidtorres

"alarm executor".
This commit moves polling tasks to the same executor,
and give the said executor more threads
to handle the extra workload.

This commit puts all client's "house keeping" tasks in one executor,
and all user code in another.
In this way, long running user code cannot starve the client of CPU.
@pongad pongad requested a review from garrettjonesgoogle May 22, 2017 06:01
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 22, 2017
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.003%) to 80.94% when pulling 40bba80 on pongad:mv-exec into 0fbd82e on GoogleCloudPlatform:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.03%) to 80.903% when pulling 9528071 on pongad:mv-exec into 0fbd82e on GoogleCloudPlatform:master.

FlowController flowController,
ScheduledExecutorService executor,
@Nullable ScheduledExecutorService alarmsExecutor,
ScheduledExecutorService alarmsExecutor,

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

ApiClock clock) {
this.executor = executor;
this.alarmsExecutor = alarmsExecutor == null ? SHARED_ALARMS_EXECUTOR : alarmsExecutor;
this.alarmsExecutor = alarmsExecutor;

This comment was marked as spam.

This comment was marked as spam.

@Nullable Long maxDesiredPulledMessages,
ScheduledExecutorService executor,
@Nullable ScheduledExecutorService alarmsExecutor,
ScheduledExecutorService alarmsExecutor,

This comment was marked as spam.

This comment was marked as spam.

private static final Duration ACK_DEADLINE_UPDATE_PERIOD = Duration.ofMinutes(1);
private static final double PERCENTILE_FOR_ACK_DEADLINE_UPDATES = 99.9;

private static final ScheduledExecutorService SHARED_ALARMS_EXECUTOR =

This comment was marked as spam.

This comment was marked as spam.


ExecutorProvider executorProvider = DEFAULT_EXECUTOR_PROVIDER;
@Nullable ExecutorProvider alarmsExecutorProvider;
ExecutorProvider alarmsExecutorProvider = FixedExecutorProvider.create(SHARED_ALARMS_EXECUTOR);

This comment was marked as spam.

This comment was marked as spam.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.03%) to 80.903% when pulling 32b057a on pongad:mv-exec into 0fbd82e on GoogleCloudPlatform:master.

@pongad
Copy link
Copy Markdown
Contributor Author

pongad commented May 25, 2017

@davidtorres PTAL

@pongad pongad merged commit 8c4c4bd into googleapis:master May 28, 2017
@pongad pongad deleted the mv-exec branch May 28, 2017 23:53
chingor13 pushed a commit that referenced this pull request Feb 20, 2026
🤖 I have created a release *beep* *boop*
---


### Updating meta-information for bleeding-edge SNAPSHOT release.

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
…e-plugin to v3.3.0 (#2079)

* build(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.3.0

* 🦉 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>
meltsufin pushed a commit that referenced this pull request May 1, 2026
…e-plugin to v3.3.0 (#2079)

* build(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.3.0

* 🦉 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>
meltsufin pushed a commit that referenced this pull request May 2, 2026
#2079)

* chore: Update generation configuration at Mon Apr 21 22:11:35 UTC 2025

* Update hermetic_library_generation.yaml

* Update generation_config.yaml

* chore: generate libraries at Mon Apr 21 22:32:36 UTC 2025

* chore: Update generation configuration at Tue Apr 22 02:30:55 UTC 2025

* chore: update build.sh to use latest formatter

* chore: use java 17 in samples check

* chore: udpate clirr

---------

Co-authored-by: Blake Li <[email protected]>
Co-authored-by: Diego Marquez <[email protected]>
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