-
Notifications
You must be signed in to change notification settings - Fork 145
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
docs: expand documentation on transactions #1539
Conversation
dev/src/index.ts
Outdated
* out or fails for any reason. | ||
* | ||
* Transactions are committed once 'updateFunction' resolves. If a transaction | ||
* fails with contention, the transaction is retried five up to five times and |
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.
"transaction is retried up to five times"
Also, the current wording makes it seem that the updateFunction
is only invoked after the retries are completed, which could be misleading.
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.
Changed the wording.
dev/src/index.ts
Outdated
* fails with contention, the transaction is retried five up to five times and | ||
* its `updateFunction` is invoked again. | ||
* | ||
* Transaction time out after 270 seconds or 60 seconds of after the last |
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.
nits:
s/Transaction/Transactions
s/60 seconds of after/seconds after
"last document is read"
Also, when does the timeout change from 60s to 270s? If a document is read in a tx, is the timeout window reduced to 60s + write-only tx timeout have a 270s timeout?
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.
Changed to:
* Transactions time out after 60 seconds if no documents are read.
* Transactions that are not committed within than 270 seconds are also
* aborted.
…is/nodejs-firestore into mrschmidt/bettertransactiondocs
Fixes #1221