collectionChanges is firing for every element on a single deletion
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
I have AngularFire/RxFire code similar to the following:
collectionChanges(
collection(this.firestore, "col1/doc1/col2"))
.subscribe(changes => {
console.log('RxFire changes', changes);
});
This generally works: When the page loads, I get added events for every document in the collection. When a document changes, a single modified event fires. However, when a document is deleted, the next change batch includes a removed event (good) and also a modified event for every other element in the collection (bad). 🤔
Any idea why these extra modify events are happening + how to avoid all the extra reads? or is this all from the cache?
I've verified there's no actual change to the other documents in the collection. A single modified change mentions oldIndex and newIndex so I wonder if it's maybe trying to update the index of every element, but there isn't a sort order so any index is undefined anyways.
If it's helpful, as a test I tried the equivalent Firebase code:
const q = query(collection(this.firestore, "collection1/doc1/collection2"));
onSnapshot(q, (snapshot) => {
const docs = snapshot.docChanges();
console.log("Changes received", docs);
});
This works as expected and only fires one removed event, which is why I think the bug is in RxFire.
- Lingua principale
- TypeScript
- Stelle
- 150
- Fork
- 50
- Merge medio
- 11g 6h
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di FirebaseExtended/rxfire
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
FirebaseExtended/rxfire#105 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
FirebaseExtended/rxfire#94 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 35/100
FirebaseExtended/rxfire#90 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
FirebaseExtended/rxfire#88 · 10 commenti · 14 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
FirebaseExtended/rxfire#84 · 1 commento · 2 reazioni ·
Tutte le issue di FirebaseExtended/rxfire
Issue simili
-
[Bug]: [MCP/CLI] Bare loopback IP addresses (127.0.0.1:port) and hosts with ports fail to navigate due to erroneous scheme inferenceForse già presa @alok-108 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/playwright#43263 ·
I maintainer di solito rispondono entro 1 giorno
-
bug priority:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
lingdojo/kana-dojo#32018 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
paperclipai/paperclip#15751 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
BuilderIO/agent-native#7275 ·
I maintainer di solito rispondono entro 1 giorno