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 — Spanner: Session pool should not retry BeginTransaction if database has been deleted by olavloite · Pull Request #6789 · googleapis/google-cloud-java

Conversation

@olavloite

@olavloite olavloite commented Nov 14, 2019

Copy link
Copy Markdown
Contributor

The session pool could start an infinite loop of prepare session calls (BeginTransaction) if the underlying database has been deleted. Instead, the session pool should detect this situation and not retry the call.

Fixes #6779

Sorry, something went wrong.

Uh oh!

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

All reactions
olavloite added 2 commits November 14, 2019 16:24
@olavloite
session pool should not retry prepare if db is deleted
7c66ee4
@olavloite
add test for create read/write session
d8fdc3b
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 14, 2019
@olavloite
olavloite requested a review from skuruppu November 14, 2019 16:22
skuruppu
skuruppu approved these changes Nov 15, 2019
View reviewed changes

@skuruppu skuruppu 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 for fixing this issue so quickly.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread ...e-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionPool.java Resolved

Uh oh!

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

@olavloite
rename to isDatabaseNotFound for clarity
7864413
@codecov

codecov Bot commented Nov 15, 2019 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Codecov Report

Merging #6789 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #6789      +/-   ##
============================================
- Coverage     46.37%   46.37%   -0.01%     
- Complexity    28026    28028       +2     
============================================
  Files          2614     2615       +1     
  Lines        288327   288309      -18     
  Branches      33810    33809       -1     
============================================
- Hits         133723   133709      -14     
+ Misses       144339   144334       -5     
- Partials      10265    10266       +1
Impacted Files Coverage Δ Complexity Δ
...oogle/cloud/spanner/jdbc/SingleUseTransaction.java 86% <0%> (-1%) 36% <0%> (-1%)
.../google/cloud/spanner/jdbc/CredentialsService.java 90.47% <0%> (-0.64%) 8% <0%> (-3%)
.../com/google/cloud/pubsub/v1/MessageDispatcher.java 84.61% <0%> (-0.52%) 23% <0%> (ø)
...rc/main/java/com/google/cloud/storage/Storage.java 79.39% <0%> (ø) 0% <0%> (ø) ⬇️
...google/cloud/logging/logback/MDCEventEnhancer.java 83.33% <0%> (ø) 4% <0%> (?)
.../google/cloud/logging/logback/LoggingAppender.java 68.5% <0%> (+4.72%) 30% <0%> (+2%) ⬆️

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 740c755...b585fd5. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

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

@olavloite
also stop trying on PermissionDenied
b585fd5
@olavloite
olavloite requested a review from skuruppu November 15, 2019 08:33
@olavloite

olavloite commented Nov 15, 2019

Copy link
Copy Markdown
Contributor Author

@skuruppu I also added a check for PermissionDenied to the session pool, as that error would cause the exact same problem as NotFound (and the same as in the Go client).

All reactions

Sorry, something went wrong.

Uh oh!

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

skuruppu
skuruppu approved these changes Nov 15, 2019
View reviewed changes

@skuruppu skuruppu 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 for the quick fix.

Sorry, something went wrong.

Uh oh!

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

All reactions
@skuruppu
skuruppu merged commit c603336 into googleapis:master Nov 15, 2019
@olavloite
olavloite deleted the spanner-stop-retrying-prepare-on-db-deleted branch November 19, 2019 09:21
This was referenced Dec 4, 2019
Release google-cloud-java v0.120.0 #6986
Closed
Release google-cloud-java v0.120.0 #6988
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@skuruppu skuruppu skuruppu approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

No one assigned

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.

spanner: Client library sending a high rate of BeginTransaction requests when database is deleted

Uh oh!

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

3 participants

@olavloite @skuruppu @googlebot
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.