vuex-easy-firestore
vuex-easy-firestore copied to clipboard
Vuex not in sync if same doc is inserted and deleted in same batch call
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 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. 🦜
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 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.