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

feat(spanner): Add lastUseTime property to session #8942

Merged
merged 8 commits into from
Nov 3, 2023

Conversation

harshachinta
Copy link
Contributor

@harshachinta harshachinta commented Oct 31, 2023

Fixes #8943

For cleaning long running transactions, we would need a track of lastUseTime, which must be updated for every RPC made with in a transaction. This PR makes necessary code changes for achieving it.

@harshachinta harshachinta requested review from a team as code owners October 31, 2023 06:49
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: spanner Issues related to the Spanner API. labels Oct 31, 2023
@harshachinta harshachinta changed the title feat(spanner): lastUseTime to update session feat(spanner): Add lastUseTime property to session Oct 31, 2023
spanner/transaction.go Outdated Show resolved Hide resolved
Copy link
Contributor

@olavloite olavloite left a comment

Choose a reason for hiding this comment

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

Approving this as it does what it should, but take a look at my to slightly generic comments and consider whether it is something that we want to pick up, either in this PR or in a follow-up PR.

spanner/client_test.go Outdated Show resolved Hide resolved
spanner/client.go Show resolved Hide resolved
Copy link
Contributor

@rahul2393 rahul2393 left a comment

Choose a reason for hiding this comment

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

LGTM

@harshachinta harshachinta merged commit b560cfc into googleapis:main Nov 3, 2023
9 checks passed
bhshkh pushed a commit that referenced this pull request Nov 3, 2023
* feat(spanner): add new field and add relevant tests

* feat(spanner): add test for read only transaction

* feat(spanner): update lastUseTime before invoking the RPC

* feat(spanner): reduce time to ms range in unit tests
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 Spanner API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spanner: Add lastUseTime parameter to session
3 participants