We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d1c927 commit 72c8406Copy full SHA for 72c8406
firebase-firestore/src/main/java/com/google/firebase/firestore/local/LocalDocumentsView.java
@@ -95,10 +95,11 @@ Document getDocument(DocumentKey key) {
95
if (overlay == null) {
96
document = remoteDocumentCache.get(key);
97
} else {
98
- if (overlay instanceof PatchMutation) {
99
- document = remoteDocumentCache.get(key);
100
- } else {
+ // Remote document elision: avoid reading remote documents if their overlay is Set or Delete.
+ if (overlay instanceof SetMutation || overlay instanceof DeleteMutation) {
101
document = MutableDocument.newInvalidDocument(key);
+ } else {
102
+ document = remoteDocumentCache.get(key);
103
}
104
overlay.applyToLocalView(document, null, Timestamp.now());
105
0 commit comments