feat: support read lock mode for R/W transactions#4010
Merged
gcf-merge-on-green[bot] merged 3 commits intogoogleapis:mainfrom Aug 18, 2025
Merged
feat: support read lock mode for R/W transactions#4010gcf-merge-on-green[bot] merged 3 commits intogoogleapis:mainfrom
gcf-merge-on-green[bot] merged 3 commits intogoogleapis:mainfrom
Conversation
1c38bc5 to
42c86b0
Compare
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java
Show resolved
Hide resolved
42c86b0 to
9fd5cb1
Compare
google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java
Outdated
Show resolved
Hide resolved
sakthivelmanii
previously approved these changes
Aug 6, 2025
olavloite
reviewed
Aug 8, 2025
| * | ||
| * <ul> | ||
| * <li>{@link ReadLockMode#PESSIMISTIC}: Read locks are acquired immediately on read. This mode | ||
| * primarily applies to transactions with {@code SERIALIZABLE} isolation. |
Collaborator
There was a problem hiding this comment.
What does this sentence mean?
This mode primarily applies to transactions with {@code SERIALIZABLE} isolation.
That it has no effect on RR? Or that it has a strong effect on Serializable?
What I'm aiming at is: Can we make this more concrete? As a customer, I would have no idea what this means.
Contributor
Author
There was a problem hiding this comment.
I've updated the doc. Currently, we do not allow setting the readLockMode for Repeatable Read(RR) isolation level and error will be returned. And by default, OPTIMISTIC lock mode will be used for RR.
google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/Options.java
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SessionImpl.java
Outdated
Show resolved
Hide resolved
google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java
Outdated
Show resolved
Hide resolved
Contributor
Author
|
@sakthivelmanii @olavloite: I've addressed the review comments. PTAL. |
sakthivelmanii
approved these changes
Aug 13, 2025
olavloite
approved these changes
Aug 18, 2025
7d752d6
into
googleapis:main
55 of 57 checks passed
svc-squareup-copybara
pushed a commit
to cashapp/misk
that referenced
this pull request
Aug 28, 2025
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [redis.clients:jedis](https://github.com/redis/jedis) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `6.1.0` -> `6.2.0` | | [com.google.cloud:google-cloud-spanner](https://github.com/googleapis/java-spanner) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `6.98.1` -> `6.99.0` | --- ### Release Notes <details> <summary>redis/jedis (redis.clients:jedis)</summary> ### [`v6.2.0`](https://github.com/redis/jedis/releases/tag/v6.2.0): 6.2.0 ### Changes #### 🚀 New Features - \[vector sets] Support for VSIM WITHATTRIBS (CAE-1421) ([#​4260](redis/jedis#4260)) - Support Redis 8 vector sets [#​4169](redis/jedis#4169) ([#​4203](redis/jedis#4203)) #### 🐛 Bug Fixes - Fix JedisBroadcastException in functionLoadReplace for Redis Cluster ([#​4219](redis/jedis#4219)) #### 🧰 Maintenance - Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.11.2 to 3.11.3 ([#​4246](redis/jedis#4246)) - Bump org.junit:junit-bom from 5.13.3 to 5.13.4 ([#​4216](redis/jedis#4216)) - docs: Improve Javadoc for HostAndPortMapper ([#​4112](redis/jedis#4112)) ([#​4227](redis/jedis#4227)) #### Contributors We'd like to thank all the contributors who worked on this release! [@​JuneYub](https://github.com/JuneYub), [@​Kguswo](https://github.com/Kguswo), [@​dependabot](https://github.com/dependabot), [@​dependabot](https://github.com/dependabot)\[bot] and [@​ggivo](https://github.com/ggivo) </details> <details> <summary>googleapis/java-spanner (com.google.cloud:google-cloud-spanner)</summary> ### [`v6.99.0`](https://github.com/googleapis/java-spanner/blob/HEAD/CHANGELOG.md#6990-2025-08-26) ##### Features - Support read lock mode for R/W transactions ([#​4010](googleapis/java-spanner#4010)) ([7d752d6](googleapis/java-spanner@7d752d6)) ##### Bug Fixes - **deps:** Update the Java code generator (gapic-generator-java) to 2.62.0 ([52c68db](googleapis/java-spanner@52c68db)) - GetCommitResponse() should return error if tx has not committed ([#​4021](googleapis/java-spanner#4021)) ([a2c179f](googleapis/java-spanner@a2c179f)) ##### Dependencies - Update dependency com.google.cloud:sdk-platform-java-config to v3.52.0 ([#​4024](googleapis/java-spanner#4024)) ([7e3294f](googleapis/java-spanner@7e3294f)) </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. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- 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: 9d031eaaab2d726402884bd41681c856931f12f0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Samples and integration tests will be added in separate PRs.