Skip to content

Conversation

@schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Oct 28, 2020

Fixes b/171204289

The original issue is that once a transaction expires, the backend returns INVALID_ARGUMENT. While INVALID_ARGUMENT is not generally retryable, we want to retry INVALID_ARGUMENT for expired transactions only. After talking with the backend TL, we decided that we can only do this based on the error message and if we have previously received a transaction ID.

This PR also changes the Rollback RPC to use the same retry semantics.

@schmidt-sebastian schmidt-sebastian requested review from a team as code owners October 28, 2020 21:53
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 28, 2020
@schmidt-sebastian schmidt-sebastian force-pushed the mrschmidt/expiredtransactions branch from d8726c5 to 2caba46 Compare October 28, 2020 22:02
@codecov
Copy link

codecov bot commented Oct 28, 2020

Codecov Report

Merging #1347 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1347      +/-   ##
==========================================
+ Coverage   98.49%   98.54%   +0.04%     
==========================================
  Files          32       32              
  Lines       19109    19115       +6     
  Branches     1370     1373       +3     
==========================================
+ Hits        18822    18836      +14     
+ Misses        284      276       -8     
  Partials        3        3              
Impacted Files Coverage Δ
dev/src/transaction.ts 98.53% <100.00%> (+1.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8717bf2...5339fb7. Read the comment docs.

@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/nodejs-firestore API. label Oct 31, 2020
Copy link
Contributor

@wilhuff wilhuff left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: firestore Issues related to the googleapis/nodejs-firestore API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants