Conversation
Collaborator
Coverage Report 1Affected Products
Test Logs |
Contributor
Collaborator
Size Report 1Affected Products
Test Logs |
…-results-from-the-local-cache
…-results-from-the-local-cache
Contributor
|
Please update the description of this PR. Feel free to (mostly) copy the description from firebase/firebase-js-sdk#6624. Also, mention that this is a port of firebase/firebase-js-sdk#6624. This really helps enabling cross linking between PRs. |
dconeybe
requested changes
Oct 25, 2022
Contributor
dconeybe
left a comment
There was a problem hiding this comment.
Looks great! Just two very minor comments, plus changes to the PR's description.
firebase-firestore/src/main/java/com/google/firebase/firestore/core/SyncEngine.java
Outdated
Show resolved
Hide resolved
firebase-firestore/src/main/java/com/google/firebase/firestore/core/View.java
Outdated
Show resolved
Hide resolved
Contributor
|
Oh, and please add a change log entry |
dconeybe
requested changes
Oct 26, 2022
Contributor
dconeybe
left a comment
There was a problem hiding this comment.
Just one tiny fix to the change log. Otherwise, LGTM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix a bug where Firestore fails to return results from the local cache if the result set was empty.
This bug is due to the following logic in
QueryListener.java:firebase-android-sdk/firebase-firestore/src/main/java/com/google/firebase/firestore/core/QueryListener.java
Line 143 in ae3bdb8
which assumes that if the result set from the local cache is empty that there is no cached result; however, if the result set of the query is indeed empty then it should be returning that empty result set from the cache.
This fix improves the logic to use the presence of a hasCachedResults flag to indicate that the empty result set is cached data and should be raised to the client.
This bug fix is ported from firebase/firebase-js-sdk#6624, which fixed #5873