Skip to content

pubsub: eventually stop polling after termination - #2113

Merged
pongad merged 2 commits into
googleapis:masterfrom
pongad:stop-poll
Jun 6, 2017
Merged

pubsub: eventually stop polling after termination#2113
pongad merged 2 commits into
googleapis:masterfrom
pongad:stop-poll

Conversation

@pongad

@pongad pongad commented Jun 5, 2017

Copy link
Copy Markdown
Contributor

Update #2103.

This does not completely fix the problem.
If an RPC is started before the shutdown, the RPC won't be canceled.
Depending on how the channels and executors are set up,
messages in the said RPCs might be lease-extended.

With this PR, at least we're not polling forever anymore.

@davidtorres

Update #2103.

This does not completely fix the problem.
If an RPC is started before the shutdown, the RPC won't be canceled.
Depending on how the channels and executors are set up,
messages in the said RPCs might be lease-extended.

With this PR, at least we're not polling forever anymore.
@pongad
pongad requested a review from garrettjonesgoogle June 5, 2017 05:44
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 5, 2017
@coveralls

Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling 007c0ef on pongad:stop-poll into ** on GoogleCloudPlatform:master**.

@garrettjonesgoogle garrettjonesgoogle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after the typo is fixed


private boolean isAlive() {
return state() == State.RUNNING || state() == State.STARTING;
// Read state only once. Because of threading, different calss can give different results.

This comment was marked as spam.

This comment was marked as spam.

}

private void pullMessages(final Duration backoff) {
if (!isAlive()) {

This comment was marked as spam.

@coveralls

Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling dbcb1ef on pongad:stop-poll into ** on GoogleCloudPlatform:master**.

@pongad
pongad merged commit b4f8ec5 into googleapis:master Jun 6, 2017
@pongad
pongad deleted the stop-poll branch June 6, 2017 03:39
chingor13 pushed a commit that referenced this pull request Feb 20, 2026
…storage to v2.37.1 (#2113)

* chore(deps): update dependency com.google.cloud:google-cloud-bigquerystorage to v2.37.1

* 🦉 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 Apr 29, 2026
* feat: track batch size using serialized size of PublishRequest

* fix: compare against batchedBytes instead of messageSize in flush condition

* fix: also count static overhead in flow control

* fix: adjust thresholds in tests

* fix: clean up merge issue

* fix: revert use of topicNameSize in MessageFlowController

* fix: store topicNameSize as initialBatchedBytes in MessagesBatch

---------

Co-authored-by: Mike Prieto <michaelpri10@gmail.com>
meltsufin pushed a commit that referenced this pull request May 1, 2026
* feat: track batch size using serialized size of PublishRequest

* fix: compare against batchedBytes instead of messageSize in flush condition

* fix: also count static overhead in flow control

* fix: adjust thresholds in tests

* fix: clean up merge issue

* fix: revert use of topicNameSize in MessageFlowController

* fix: store topicNameSize as initialBatchedBytes in MessagesBatch

---------

Co-authored-by: Mike Prieto <michaelpri10@gmail.com>
benjaminp pushed a commit to benjaminp/google-cloud-java that referenced this pull request Jul 13, 2026
…v3.25.0 (googleapis#2113)

* deps: update dependency com.google.cloud:sdk-platform-java-config to v3.25.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>
benjaminp pushed a commit to benjaminp/google-cloud-java that referenced this pull request Jul 13, 2026
🤖 I have created a release *beep* *boop*
---


## [2.34.0](https://togithub.com/googleapis/java-bigtable/compare/v2.33.0...v2.34.0) (2024-02-21)


### Features

* Add the export logic for per-connection error rate metric ([googleapis#2121](https://togithub.com/googleapis/java-bigtable/issues/2121)) ([471549e](https://togithub.com/googleapis/java-bigtable/commit/471549ef044d9800290866f485bd757b8b09157d))
* Create the backbone of counting errors per connection each minute. ([googleapis#2094](https://togithub.com/googleapis/java-bigtable/issues/2094)) ([77e5b37](https://togithub.com/googleapis/java-bigtable/commit/77e5b37cf9ee6a6e43140455013ded149e538fe8))


### Dependencies

* Update actions/setup-java action to v4 ([googleapis#2106](https://togithub.com/googleapis/java-bigtable/issues/2106)) ([b7f826b](https://togithub.com/googleapis/java-bigtable/commit/b7f826b00e367cc9324ce0c3b925f8969a5e6ac4))
* Update dependency com.google.cloud:gapic-libraries-bom to v1.30.0 ([googleapis#2126](https://togithub.com/googleapis/java-bigtable/issues/2126)) ([6aafb7c](https://togithub.com/googleapis/java-bigtable/commit/6aafb7c6391423538e22e9d3d2c05edbc3ba5b96))
* Update dependency com.google.cloud:sdk-platform-java-config to v3.25.0 ([googleapis#2113](https://togithub.com/googleapis/java-bigtable/issues/2113)) ([e69d419](https://togithub.com/googleapis/java-bigtable/commit/e69d419d621c374189414ed29d72e56fbd7a4395))
* Update dependency com.google.truth.extensions:truth-proto-extension to v1.4.1 ([googleapis#2119](https://togithub.com/googleapis/java-bigtable/issues/2119)) ([cdd1ed1](https://togithub.com/googleapis/java-bigtable/commit/cdd1ed13a870651ead8ef5f11a9751ff6c1b110c))
* Update dependency org.graalvm.buildtools:junit-platform-native to v0.10.1 ([googleapis#2122](https://togithub.com/googleapis/java-bigtable/issues/2122)) ([6e98371](https://togithub.com/googleapis/java-bigtable/commit/6e983717fb0acef14851257a59cf89fed765e770))
* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.10.1 ([googleapis#2123](https://togithub.com/googleapis/java-bigtable/issues/2123)) ([22e5eea](https://togithub.com/googleapis/java-bigtable/commit/22e5eea37b31fab49c0f0ce52e42dff02dfe3e73))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
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.

5 participants