Skip to content

fix: only close and return sessions once #3846

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

Merged
merged 2 commits into from
Apr 30, 2025
Merged

Conversation

olavloite
Copy link
Collaborator

Closing a pooled session multiple times would cause it to be added to the pool multiple times. This fix prevents this by keeping track of the state of a session that has been checked out.

@olavloite olavloite requested review from a team as code owners April 30, 2025 16:25
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/java-spanner API. labels Apr 30, 2025
@olavloite olavloite requested a review from rahul2393 April 30, 2025 16:25
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: m Pull request size is medium. labels Apr 30, 2025
Closing a pooled session multiple times would cause it to be added to the pool
multiple times. This fix prevents this by keeping track of the state of a session
that has been checked out.
@olavloite olavloite force-pushed the only-close-session-once branch from 6b0ae6a to a2fc47b Compare April 30, 2025 16:39
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Apr 30, 2025
@olavloite olavloite merged commit 32b2373 into main Apr 30, 2025
35 of 36 checks passed
@olavloite olavloite deleted the only-close-session-once branch April 30, 2025 19:34
svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request May 9, 2025
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
|
[com.google.cloud:google-cloud-spanner](https://github.com/googleapis/java-spanner)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`6.92.0` -> `6.93.0` |

---

### Release Notes

<details>
<summary>googleapis/java-spanner
(com.google.cloud:google-cloud-spanner)</summary>

###
[`v6.93.0`](https://github.com/googleapis/java-spanner/blob/HEAD/CHANGELOG.md#6930-2025-05-09)

##### Features

- Enable AFE and gRPC metrics for DP
([#&#8203;3852](googleapis/java-spanner#3852))
([203baae](googleapis/java-spanner@203baae))

##### Bug Fixes

- Change server timing duration attribute to float as per w3c
([#&#8203;3851](googleapis/java-spanner#3851))
([da8dd8d](googleapis/java-spanner@da8dd8d))
- **deps:** Update the Java code generator (gapic-generator-java) to
2.57.0
([23b985c](googleapis/java-spanner@23b985c))
- Non-ASCII Unicode characters in code
([#&#8203;3844](googleapis/java-spanner#3844))
([85a0820](googleapis/java-spanner@85a0820))
- Only close and return sessions once
([#&#8203;3846](googleapis/java-spanner#3846))
([32b2373](googleapis/java-spanner@32b2373))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am
every weekday" in timezone Australia/Melbourne, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

GitOrigin-RevId: bcf762c4aff746876d98c5fcd10f568fa9f00651
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants