-
Notifications
You must be signed in to change notification settings - Fork 893
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
More performant handling of out of order updates. #8608
base: main
Are you sure you want to change the base?
Conversation
…ingle document in a global snapshot.
|
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
LGTM. Nice fix! Please add a changeset though. Also, please make sure these tests and fixes get ported to android and ios (whether you do the porting or someone else does). |
If multiple queries receive updates to the same doc in the same global snapshot, watch does not guarantee the order of results received. Newer document versions may be received for one query before older document versions for another query. In some conditions, a newer document snapshot version could be overwritten by an older document snapshot version in the watch change aggregator. In the test scenario, stale document data is raised in a fromCache snapshot, and then the correct results were raised after a limbo resolution.
This PR provides a simple fix in the watch change aggregator where it will always accept the newest document snapshot if multiple versions are received.