I have a question about a theoretical situation and how the Firestore JS SDK handles it.
The setup is:
- We have offline persistence enabled.
- We're offline
- We need to
get()
from collection A immediately after coming online.
I'm gonna exaggerate the numbers to make the situation more easily graspable.
Steps
- While offline, we add 1000000 documents to collection A.
- We come back online, and the assumption is that Firestore starts synching the local data from Collection A to the server, which will take a while.
- We do a
get()
from collection A, while Firestore might not yet have finished synching.
What happens? The assumption here is that, seeing as Firestore has detected we're online again, it tries to get the documents from Collection A that are found in the online DB, and thus might miss out on some of the documents that is still being synchronized from step 2.
Can a Firebase engineer clarify what would happen in this scenario?