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

Add the ability to replay failed mutations #3490

Open
gbitaudeau opened this issue Feb 1, 2024 · 1 comment
Open

Add the ability to replay failed mutations #3490

gbitaudeau opened this issue Feb 1, 2024 · 1 comment
Labels
datastore Issues related to the DataStore category feature-request Request a new feature

Comments

@gbitaudeau
Copy link

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

As describe on #3259 , mutation errors can happen for various reasons.

Even through the DataStore does its best effort to replay mutations in case of errors, sometimes mutations can't be replayed and in this case the DataStore content is no longer the same as the server content with no way to correct it.

Describe the solution you'd like

A nice feature would be to help developers to replay or correct failed mutations.

Few ideas to do that :

  • add a mutationErrorHandler to DataStoreConfiguration which can force a mutation to be kept by datastore giving a retry delay, a retry priority (if other mutations should be sent before this one will be retried) or something like that
  • persist a "mutation on error" list which can be consult and easily retried
  • ...

Describe alternatives you've considered

Actually, to "replay" mutation we follow this flow :

  1. clear the DataStore
  2. wait it to be full sync
  3. compare it with our local base and replay all missing creates / updates / deletes again (using DataStore.save/delete )

Is the feature request related to any of the existing Amplify categories?

DataStore

Additional context

No response

@thisisabhash thisisabhash added datastore Issues related to the DataStore category feature-request Request a new feature labels Feb 1, 2024
Copy link

github-actions bot commented Feb 1, 2024

This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datastore Issues related to the DataStore category feature-request Request a new feature
Projects
None yet
Development

No branches or pull requests

2 participants