We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9105f02 commit c7d7a95Copy full SHA for c7d7a95
firebase-firestore/src/main/java/com/google/firebase/firestore/local/LocalStore.java
@@ -558,8 +558,10 @@ public void releaseQuery(Query query) {
558
queryCache.updateQueryData(queryData);
559
}
560
561
- // We remove both locally edited documents and documents that are associated via the query
562
- // cache.
+ // Documents send via Watch are automatically dereferenced when we remove a query's
+ // target data from the reference delegate. Since this does not remove references for
563
+ // locally mutated documents, we have to remove the target associations for these
564
+ // documents manually.
565
ImmutableSortedSet<DocumentKey> removedReferences =
566
localViewReferences.removeReferencesForId(queryData.getTargetId());
567
for (DocumentKey key : removedReferences) {
0 commit comments