Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Deadlock in RetryingConnectionImpl when tearing down a connection #406

Merged
merged 2 commits into from
Dec 8, 2020

Conversation

dpcollins-google
Copy link
Collaborator

@dpcollins-google dpcollins-google commented Dec 7, 2020

Also use a shared executor for all GRPC clients to reduce total threadcount and fix errors when tearing down executors used by GRPC connections.

Also add logging to RetryingConnectionImpl

Also ensure all calls out from RetryingConnectionImpl cannot leak exceptions.

Also ensure all streams have heartbeating enabled.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️

Also use a shared executor for all GRPC clients to reduce total threadcount and fix errors when tearing down executors used by GRPC connections.

Also add logging to RetryingConnectionImpl

Also ensure all calls out from RetryingConnectionImpl cannot leak exceptions.
@dpcollins-google dpcollins-google requested a review from a team as a code owner December 7, 2020 23:02
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 7, 2020
@product-auto-label product-auto-label bot added the api: pubsublite Issues related to the googleapis/java-pubsublite API. label Dec 7, 2020
@codecov
Copy link

codecov bot commented Dec 8, 2020

Codecov Report

Merging #406 (cdd96eb) into master (0e4cb93) will decrease coverage by 0.42%.
The diff coverage is 47.76%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #406      +/-   ##
============================================
- Coverage     71.70%   71.28%   -0.43%     
+ Complexity      814      810       -4     
============================================
  Files           156      156              
  Lines          4404     4377      -27     
  Branches        219      221       +2     
============================================
- Hits           3158     3120      -38     
- Misses         1126     1137      +11     
  Partials        120      120              
Impacted Files Coverage Δ Complexity Δ
...ava/com/google/cloud/pubsublite/internal/Lazy.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...ogle/cloud/pubsublite/internal/ServiceClients.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...loud/pubsublite/internal/wire/RoutingMetadata.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...google/cloud/pubsublite/beam/PublisherOptions.java 25.00% <0.00%> (+1.47%) 4.00 <0.00> (ø)
...bsublite/internal/wire/RetryingConnectionImpl.java 65.00% <50.00%> (-1.67%) 12.00 <1.00> (+1.00) ⬇️
...loud/pubsublite/cloudpubsub/PublisherSettings.java 100.00% <100.00%> (ø) 7.00 <0.00> (ø)
...oud/pubsublite/cloudpubsub/SubscriberSettings.java 89.36% <100.00%> (-0.23%) 12.00 <0.00> (ø)
...gle/cloud/pubsublite/internal/AdminClientImpl.java 100.00% <100.00%> (ø) 18.00 <2.00> (ø)
...loud/pubsublite/internal/TopicStatsClientImpl.java 100.00% <100.00%> (ø) 3.00 <0.00> (ø)
...loud/pubsublite/internal/wire/AssignerBuilder.java 65.38% <100.00%> (-1.29%) 3.00 <0.00> (ø)
... and 4 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 509dad6...cdd96eb. Read the comment docs.

@dpcollins-google dpcollins-google merged commit af77486 into master Dec 8, 2020
@dpcollins-google dpcollins-google deleted the fix-deadlock branch December 8, 2020 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsublite Issues related to the googleapis/java-pubsublite API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants