GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Make sure that background resources are closed when the PubSub subscriber fails by mdirkse · Pull Request #6238 · googleapis/google-cloud-java

Conversation

@mdirkse

@mdirkse mdirkse commented Sep 9, 2019

Copy link
Copy Markdown

Completes fix of #5227.

We found that the PubSub Subscriber can go into a thread creation loop when it fails on startup, eventually causing system-wide thread starvation. This PR fixes that problem by making sure that all background resources are also shut down on failure (instead of just when stopped).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 9, 2019
@chingor13 chingor13 assigned kamalaboulhosn Sep 9, 2019
@chingor13
chingor13 requested a review from kamalaboulhosn September 9, 2019 16:41
@kamalaboulhosn
kamalaboulhosn requested a review from hannahrogers-google September 9, 2019 16:45
hannahrogers-google
hannahrogers-google suggested changes Sep 18, 2019
View reviewed changes

@hannahrogers-google hannahrogers-google left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@mdirkse, thanks for your PR! Looks good - just a small change requested for the unit test

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .../google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/FakeFixedExecutorProvider.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...oud-clients/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriberTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@hannahrogers-google

hannahrogers-google commented Oct 7, 2019

Copy link
Copy Markdown
Contributor

@mdirkse, did you want to take a look at the requested changes so that we can merge this PR?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mdirkse

mdirkse commented Oct 15, 2019

Copy link
Copy Markdown
Author

Yes! Sorry, will do so today.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mdirkse
mdirkse force-pushed the master branch 2 times, most recently from 4f40b49 to 70a0bc6 Compare October 17, 2019 19:45
hannahrogers-google
hannahrogers-google approved these changes Oct 21, 2019
View reviewed changes

@hannahrogers-google hannahrogers-google left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks @mdirkse!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hongalex hongalex added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 31, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 31, 2019
Maarten Dirkse @mdirkse
Make sure that background resources are closed when the subscriber fa…
adf0d35
…ils.
@mdirkse
mdirkse force-pushed the master branch from 70a0bc6 to adf0d35 Compare November 7, 2019 10:48
@codecov

codecov Bot commented Nov 7, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Merging #6238 into master will increase coverage by 0.36%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #6238      +/-   ##
============================================
+ Coverage        46%   46.36%   +0.36%     
- Complexity    26517    28037    +1520     
============================================
  Files          2614     2614              
  Lines        282790   288197    +5407     
  Branches      33598    33789     +191     
============================================
+ Hits         130084   133614    +3530     
- Misses       143430   144333     +903     
- Partials       9276    10250     +974
Impacted Files Coverage Δ Complexity Δ
...in/java/com/google/cloud/pubsub/v1/Subscriber.java 79.32% <100%> (+1.61%) 20 <2> (+3) ⬆️
...va/com/google/cloud/compute/v1/InstanceClient.java 55.09% <0%> (-7.79%) 147% <0%> (+36%)
...onitoring/v3/NotificationChannelServiceClient.java 64.49% <0%> (-7.13%) 43% <0%> (+10%)
...ava/com/google/cloud/compute/v1/ProjectClient.java 57.07% <0%> (-6.99%) 55% <0%> (+13%)
.../com/google/cloud/compute/v1/TargetPoolClient.java 57.73% <0%> (-6.98%) 47% <0%> (+11%)
...va/com/google/cloud/compute/v1/SnapshotClient.java 55.73% <0%> (-6.88%) 31% <0%> (+7%)
...oogle/cloud/kms/v1/KeyManagementServiceClient.java 62.88% <0%> (-6.84%) 103% <0%> (+25%)
...com/google/cloud/compute/v1/ReservationClient.java 59.14% <0%> (-6.83%) 39% <0%> (+9%)
...a/com/google/cloud/compute/v1/NodeGroupClient.java 60.36% <0%> (-6.82%) 51% <0%> (+12%)
.../com/google/cloud/compute/v1/SubnetworkClient.java 60.36% <0%> (-6.82%) 51% <0%> (+12%)
... and 640 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe11ffa...adf0d35. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mdirkse

mdirkse commented Nov 7, 2019

Copy link
Copy Markdown
Author

Fixed the formatting error.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pmakani pmakani added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 7, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 7, 2019
@hannahrogers-google
hannahrogers-google merged commit dd5bb61 into googleapis:master Nov 7, 2019
@chingor13 chingor13 mentioned this pull request Nov 13, 2019
Release google-cloud-java v0.119.0 #6772
Merged
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
@mdirkse @hannahrogers-google
Make sure that background resources are closed when the subscriber fa…
7f26f7a
…ils. (#6238)
meltsufin pushed a commit that referenced this pull request May 1, 2026
@mdirkse @hannahrogers-google
Make sure that background resources are closed when the subscriber fa…
57dba1b
…ils. (#6238)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kamalaboulhosn kamalaboulhosn Awaiting requested review from kamalaboulhosn
1 more reviewer
@hannahrogers-google hannahrogers-google hannahrogers-google approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@kamalaboulhosn kamalaboulhosn

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@mdirkse @hannahrogers-google @kamalaboulhosn @googlebot @hongalex @pmakani @yoshi-kokoro
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.