Filtering happens after group_by repartitioning
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- kafka, python
調査の方向性
The problem sits in faust/streams.py: group_by calls chain(), which creates a new stream, so the upstream filter() ends up running in self._next after the repartition step. Start by reading the chain() and group_by code paths and how filter() is applied in the stream iteration. Done means a filter placed before group_by drops events before they reach the repartition topic, shown by a test that checks what is sent to the repartition topic. The issue has no comments or maintainer direction, so confirm the intended ordering first.
索引モデルが issue の本文から書いたものです。
説明
Checklist
- I have included information about relevant versions
- I have verified that the issue persists when using the
masterbranch of Faust.
Steps to reproduce
async for v in stream.filter(lambda: v > 1000).group_by(...):
... # do something
By using .filter with .group_by it appears that every event is sent to repartition topic, even if the event doesn't pass the filtering and filtering happens only after repartitioning is done. Thus the extra work is done.
Expected behavior
As the docs says the .filter() method should be useful for filtering events before repartitioning a stream. So the filtered events won't be sent to the repartition topic.
Actual behavior
Filtering happens after repartitioning because of the chain method inside the group_by which creates new stream and moves the.filter() process to the self._next which happens after the repartition process.
Versions
- Python version: Python 3.10.6
- Faust version: 0.10.14
- Operating system: Ubuntu 22
- Kafka version: 3.4
- RocksDB version (if applicable)
- 主要言語
- Python
- スター
- 1.9k
- フォーク
- 205
- 平均マージ
- 2時間 2分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
faust-streaming/faust のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
faust-streaming/faust#804 ·
-
scripts/install script forces use of ./venv virtualenv, impossible to use with virtualenvwrapperオープン
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
faust-streaming/faust#28 · コメント 1 件 ·
-
[BUG] SASL PLAINTEXT producer initialization fails : missing sasl_plain_username/password対応中かも @wbarnha が 56 日前に担当しました。 オープン
faust-streaming/faust#794 · コメント 2 件 · リアクション 1 件 · 担当者 2 名 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
faust-streaming/faust#670 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
faust-streaming/faust#666 ·
faust-streaming/faust の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
OpenFreeEnergy/openfe#2371 ·
メンテナーはふだん 2 日以内に返信
-
HMDB's smiles file writes "None" for metabolites with an empty <smiles/> (file not currently used)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
NCATSTranslator/Babel#1269 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
404 on sample dataオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
bcgov/nr-hydrometric-rating-curve#443 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100