-
Notifications
You must be signed in to change notification settings - Fork 624
Clear the lastLimboFreeSnapshot version on existence filter mismatch #3267
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
Conversation
Coverage Report 1Affected Products
Test Logs
Notes |
Size Report 1Affected Products
Test Logs
Notes |
/test device-check-changed |
1 similar comment
/test device-check-changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the test case in existence_spec_test.json, or somewhere else, check that the targetData.lastLimboFreeSnapshotVersion is reset to none?
Other than that, the code itself is good. I verified via several test runs and never saw the error.
@bswhite1 Thanks for verifying. I also added another test case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
What is the easiest way to determine when this is part of a release?
Do you ever use git Tags, or release branches?
Please take a look at our release notes to determine what is contained in a release. This PR should be included in the next cut. We use a private GitHub repository to manage our releases. The tags are not visible here. |
firebase-firestore/CHANGELOG.md
Outdated
@@ -7,6 +7,8 @@ by opting into a release at | |||
updates that have not yet been synced with the backend. | |||
- [changed] Improved performance for queries against collections that contain | |||
subcollections. | |||
- [fixed] Fixed an issue that may have caused the SDK to raise incomplete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"may have caused" sounds to me like you are unsure that this is the root cause; however, it seems that the root cause is definitively known. Would it make sense to re-word this to imply that the buggy behavior is intermittent?
e.g. Fixed an issue that causes the SDK to sometimes raise incomplete snapshots...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Will update
This fixes a problem where the SDK receives an existence filter mismatch and clears the mapping of documents to targets, but does not receive another snapshot that also clears the snapshot version (i.e. the device went in the background and did was not able to actually process a re-run of the query).
The change that this PR makes is that we always reset the lastLimboFreeSnapshot version to 0 if we get a target mismatch.
Fixes #3249