[go: nahoru, domu]

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

firestore: let BulkWriter retry only when a retriable error occurs #9295

Open
KamikazeZirou opened this issue Jan 24, 2024 · 0 comments
Open
Assignees
Labels
api: firestore Issues related to the Firestore API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@KamikazeZirou
Copy link
KamikazeZirou commented Jan 24, 2024

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

BulkWriter will retry 10 times if it encounters an error that cannot be resolved by retrying. This slows down the process unnecessarily. If the error is not resolved by retrying, it is better to return an error immediately without retrying.

Here is an example.

Suppose you already have a Document on Firestore and call BulkWriter.Create on it. In that case, an AlreadyExists error occurs and BulkWriter retries 10 times to write in vain. In my environment, it took 10 seconds for all the retry to finish.

Describe the solution you'd like

BulkWriter doesn't retry write operations when errors occur that cannot be resolved by retrying.
As with Transaction, why not retry only when the error code is ABORTED?

Describe alternatives you've considered

When creating a BulkWriter, it would be good if the module user could specify the errors to retry as an option.

Additional context

BulkWriter's retry process is here.

I use BulkWriter's Create and Update as asynchronous processes. This asynchronous processing may be called multiple times and the order of processing is not guaranteed. That's why things like the first example I gave happen.

@KamikazeZirou KamikazeZirou added the triage me I really want to be triaged. label Jan 24, 2024
@product-auto-label product-auto-label bot added the api: firestore Issues related to the Firestore API. label Jan 24, 2024
@KamikazeZirou KamikazeZirou changed the title firestore: let BulkWriter retry only when a retriable error occurs. firestore: let BulkWriter retry only when a retriable error occurs Jan 24, 2024
@noahdietz noahdietz added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed triage me I really want to be triaged. labels Jan 30, 2024
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 Firestore API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants