Skip to content
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

Support optimistic transactions as an option #1089

Open
merlinnot opened this issue May 26, 2020 · 2 comments · May be fixed by #1548
Open

Support optimistic transactions as an option #1089

merlinnot opened this issue May 26, 2020 · 2 comments · May be fixed by #1548
Labels
api: firestore Issues related to the googleapis/nodejs-firestore API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@merlinnot
Copy link

merlinnot commented May 26, 2020

Is your feature request related to a problem? Please describe.

I found that for some usage patterns optimistic transactions would work better than pessimistic.

Describe the solution you'd like

I'd like to pass an option to runTransaction which would allow me to choose if pessimistic or optimistic transactions should be used.

Describe alternatives you've considered

There are workarounds for it, like manually fetching documents, checking preconditions, then starting a transaction and reading the documents again, but I find it unnecessarily verbose and having an optimistic transaction would make my code simpler.

Additional context

None.

@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/nodejs-firestore API. label May 26, 2020
@schmidt-sebastian schmidt-sebastian added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label May 26, 2020
@schmidt-sebastian
Copy link
Contributor

@merlinnot Thanks for filing this. This is something we can consider for a future release, but we will likely need additional customer requests before we can prioritize this work internally.

@merlinnot
Copy link
Author

Sure thing, I don't expect it to happen any time soon. Good to have it on the radar though.

@schmidt-sebastian schmidt-sebastian self-assigned this Jun 29, 2021
@schmidt-sebastian schmidt-sebastian removed their assignment Apr 14, 2022
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. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants