-
Notifications
You must be signed in to change notification settings - Fork 66
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
fix: Transactions with readTime
will omit begin and commit transaction requests, and instead pass readTime
on individual read requests.
#1565
Conversation
readTime
will omit begin and commit transaction requests, and instead pass readTime
on individual read requests.
google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreImpl.java
Outdated
Show resolved
Hide resolved
...le-cloud-firestore/src/main/java/com/google/cloud/firestore/ServerSideTransactionRunner.java
Show resolved
Hide resolved
...le-cloud-firestore/src/main/java/com/google/cloud/firestore/ServerSideTransactionRunner.java
Show resolved
Hide resolved
google-cloud-firestore/src/main/java/com/google/cloud/firestore/ServerSideTransaction.java
Show resolved
Hide resolved
google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITSystemTest.java
Show resolved
Hide resolved
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.
Thanks for the feedback. I think I have addressed all points, and pushed up changes.
...le-cloud-firestore/src/main/java/com/google/cloud/firestore/ServerSideTransactionRunner.java
Show resolved
Hide resolved
google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITSystemTest.java
Show resolved
Hide resolved
...le-cloud-firestore/src/main/java/com/google/cloud/firestore/ServerSideTransactionRunner.java
Show resolved
Hide resolved
google-cloud-firestore/src/main/java/com/google/cloud/firestore/ServerSideTransaction.java
Show resolved
Hide resolved
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.
LGTM, with one quick question. readTime is added for Query and AggregateQuery, what about single documents?
The proto doesn't support transaction or readTime on single get. Whenever transaction or readTime is required, we use batch get proto, even if it is for a single document. |
Transactions with
readTime
do not need to begin and commit transaction. Instead, the individual requests can usereadTime
instead oftransactionId
. This will reduce latency when doing point in time reads.