collectionChanges is firing for every element on a single deletion
評価
この issue はまだ評価されていません。
説明
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.
- 主要言語
- TypeScript
- スター
- 150
- フォーク
- 50
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
FirebaseExtended/rxfire のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
FirebaseExtended/rxfire#105 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
FirebaseExtended/rxfire#94 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
FirebaseExtended/rxfire#90 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
FirebaseExtended/rxfire#88 · コメント 10 件 · リアクション 14 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
FirebaseExtended/rxfire#84 · コメント 1 件 · リアクション 2 件 ·
FirebaseExtended/rxfire の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
getsentry/sentry-conventions#732 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
status:in-linear status:team-assigned team:nodes
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
motiondivision/motion#3955 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
equinor/prisma-decision-web#919 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 83/100