Merged
Conversation
ehsannas
reviewed
Jan 4, 2024
Contributor
ehsannas
left a comment
There was a problem hiding this comment.
Even though the documentation suggests that rollbacks are best-effort, we may want to still keep up the effort to retry the rollback unless we're positive the retry will fail (i.e. for INTERNAL error code).
Comment on lines
+1200
to
+1201
| System.out.println("BAD INVOCATION"); | ||
| System.out.println(invocationOnMock.getArguments()[0]); |
4d0835c to
4e94636
Compare
Contributor
Author
I verified that GAPIC does do the retries from |
ehsannas
approved these changes
Jan 17, 2024
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Jan 25, 2024
🤖 I have created a release *beep* *boop* --- ## [3.16.1](https://togithub.com/googleapis/java-firestore/compare/v3.16.0...v3.16.1) (2024-01-25) ### Bug Fixes * `internalStream` should handle duplicate `onComplete`s. ([#1523](https://togithub.com/googleapis/java-firestore/issues/1523)) ([b3067d7](https://togithub.com/googleapis/java-firestore/commit/b3067d7b382ea5c4c9124a12a701abe2f7289503)) * Allow an explicit MustExist precondition for update ([#1542](https://togithub.com/googleapis/java-firestore/issues/1542)) ([46e09aa](https://togithub.com/googleapis/java-firestore/commit/46e09aad7f6689d4dfe82bd284905d52edda4364)) * **deps:** Update the Java code generator (gapic-generator-java) to 2.32.0 ([#1534](https://togithub.com/googleapis/java-firestore/issues/1534)) ([2281320](https://togithub.com/googleapis/java-firestore/commit/2281320fd924a1d6c259a493ce703a51f0cd8a03)) * Make rollback best effort. ([#1515](https://togithub.com/googleapis/java-firestore/issues/1515)) ([4c39af5](https://togithub.com/googleapis/java-firestore/commit/4c39af50d6d416440164fc5d5360f3912cd8f01b)) * Thread safe UpdateBuilder ([#1537](https://togithub.com/googleapis/java-firestore/issues/1537)) ([f9cdab5](https://togithub.com/googleapis/java-firestore/commit/f9cdab5885bd1d500c6fc412eb3090cea9347d0e)) ### Dependencies * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.22.0 ([#1535](https://togithub.com/googleapis/java-firestore/issues/1535)) ([04c0e07](https://togithub.com/googleapis/java-firestore/commit/04c0e0736ddcd49eb42aacb31e2fc087b2a39754)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.23.0 ([#1544](https://togithub.com/googleapis/java-firestore/issues/1544)) ([79713bf](https://togithub.com/googleapis/java-firestore/commit/79713bf0fa376a4d22518ae2f5da9660795d9f89)) ### Documentation * Fix formatting due to unclosed backtick ([#1529](https://togithub.com/googleapis/java-firestore/issues/1529)) ([3c78fe3](https://togithub.com/googleapis/java-firestore/commit/3c78fe3c248cb212c6e4f91a5bb7aeb8b9b003b0)) * Rring BulkWriter out of BetaApi status. ([#1513](https://togithub.com/googleapis/java-firestore/issues/1513)) ([c2812f7](https://togithub.com/googleapis/java-firestore/commit/c2812f7cb72257512ffecc98ec1bdb1109d7d044)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
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.
Internal tracking: b/318686162
A rollback is meant to be best effort. If the transaction has already expired, it is possible for the rollback to fail due to transaction no longer existing in Firestore. The retry logic will use attempts to rollback, and in the case where transaction no longer exists, all attempts to be exhausted attempted to rollback transaction.
This PR makes the rollback best effort, simply logging any rollback error and continuing.