8000 Spanner: Fix potential session leak when BeginTransaction would throw an error by olavloite · Pull Request #6165 · googleapis/google-cloud-java · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@olavloite
Copy link

If a non-retryable error occurred during the BeginTransaction rpc, a session would leak from the pool.

Fixes #6164

@olavloite olavloite requested review from kolea2 and skuruppu August 26, 2019 15:46
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 26, 2019
@olavloite olavloite force-pushed the spanner-fix-session-leak branch from f07de1f to 80809d5 Compare August 26, 2019 16:47
@codecov
Copy link
codecov bot commented Aug 26, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@8bfa2c2). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #6165   +/-   ##
=========================================
  Coverage          ?   47.49%           
  Complexity        ?    27432           
=========================================
  Files             ?     2524           
  Lines             ?   274672           
  Branches          ?    31414           
=========================================
  Hits              ?   130445           
  Misses            ?   134594           
  Partials          ?     9633

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 8bfa2c2...5004e46. Read the comment docs.

The session that caused an error should be released back into the pool
before an error is returned to the caller in order to trigger a new
prepare of a session. The prepare will be triggered because the pool
will see the caller that is still waiting for a write session as a
readWriteWaiter.
@skuruppu skuruppu merged commit 2c9e603 into googleapis:master Aug 28, 2019
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.

Spanner: Exception on BeginTransaction rpc can cause session leak

3 participants

0