pubsub: eventually stop polling after termination - #2113
Merged
Conversation
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.
|
Changes Unknown when pulling 007c0ef on pongad:stop-poll into ** on GoogleCloudPlatform:master**. |
garrettjonesgoogle
left a comment
Contributor
There was a problem hiding this comment.
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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
davidtorres
reviewed
Jun 5, 2017
| } | ||
|
|
||
| private void pullMessages(final Duration backoff) { | ||
| if (!isAlive()) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
Changes Unknown when pulling dbcb1ef on pongad:stop-poll into ** on GoogleCloudPlatform:master**. |
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>
meltsufin
pushed a commit
that referenced
this pull request
May 2, 2026
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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