-
Notifications
You must be signed in to change notification settings - Fork 133
feat: support read lock mode for R/W transactions #4010
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
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
* | ||
* <ul> | ||
* <li>{@link ReadLockMode#PESSIMISTIC}: Read locks are acquired immediately on read. This mode | ||
* primarily applies to transactions with {@code SERIALIZABLE} isolation. |
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.
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.
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.
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
@sakthivelmanii @olavloite: I've addressed the review comments. PTAL. |
7d752d6
into
googleapis:main
Samples and integration tests will be added in separate PRs.