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

Vuex not in sync if same doc is inserted and deleted in same batch call #260

Open
jacksonrya opened this issue Nov 12, 2019 · 3 comments
Open
Labels
bug Something isn't working
Milestone

Comments

@jacksonrya
Copy link

If a document is created locally and then immediately deleted, in a short enough time that the two calls become batched, the document is deleted locally but still exists in Firestore.

@jacksonrya jacksonrya changed the title Vuex not in sync if same doc is inserted and deleted in batch call Vuex not in sync if same doc is inserted and deleted in same batch call Nov 12, 2019
@mesqueeb
Copy link
Owner

@jacksonrya Good catch!! 😉
I'd like to know a little bit more about your use case. Can you let me know, in what kind of situation in your app a document would get created and deleted again in under 1 second?

Thanks!!

--
Vuex Easy Firestore was made with ♥ by Luca Ban.
If this library helped you in any way you can support me by buying me a cup of coffee. ☕️
You can also reach out on twitter if you want a one-on-one coding review/lesson. 🦜

@louisameline
Copy link
Collaborator

Apart from the user's use case, is this an issue in the way v-e-f queues its requests, or is Firebase that ignores the delete request?

@louisameline louisameline added the bug Something isn't working label Dec 6, 2019
@louisameline louisameline added this to the v2.0 milestone Dec 6, 2019
@mesqueeb
Copy link
Owner

@louisameline this is an issue in my implementation. I know I can fix this if I want. I was just hoping on more context so I have better insight in how I can fix it. :D

VEF not only batches all changes within 1000ms, it also groups changes made to the same documents, therefore a deletion and update request conflict.

I think on firebase side it will also provide an error if you submit a batch with an update and delete request on the same document, because batches have no specific order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants