[Bug] BatchConsumerPolicy violation
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
調査の方向性
The report concerns batch receive on a partitioned Pulsar topic, where a batch policy with max_num_message=400 and timeout=-1 hangs while timeout=50ms does not. Start by reproducing the stall with a partitioned topic and a batch receive loop, then trace how the batch policy's count and timeout conditions are evaluated in the C++ client. Done means batch_receive returns after 400 messages and no longer blocks indefinitely when the timeout is disabled.
索引モデルが issue の本文から書いたものです。
説明
Search before asking
- I searched in the issues and found nothing similar.
Version
OS: Debian GNU/Linux
version 11 (Bullseye)
pulsar version 3.0.13
Minimal reproduce step
Use pulsar-client python library 3.1.0
initialise a BatchConsumerPolicy on n different partitions of the same topic with timeout = -1 , max_num_bytes = -1, max_num_message = 400
and then subscribe to partitions with this policy and begin consuming using batch_receive() method
What did you expect to see?
Expected that the consumption of messages from any partition will happen normally (wait for the max num and then return)
What did you see instead?
It was observed that the batch_receive() method got permanently stuck after a few days. Restarting the python program mitigated the issue. Another python program running a different subscription on the same topic with BatchConsumerPolicy(max_num_message=-1,max_num_bytes=-1,timeout=1second) ran perfectly without any issues and the topic was such that there would be 0 produce at most a few minutes in a couple of days. Whenever the first process got stuck, the second one never got stuck. The first one got stuck at seemingly irregular patterns but definitely eventually.
Another point to note is that this was the only difference between both of them.
Following this observation I changed the BatchConsumerPolicy from BatchConsumerPolicy(max_num_message=400,max_num_bytes=-1,timeout=-1) to BatchConsumerPolicy(max_num_message=-1,max_num_bytes=-1,timeout=50ms) and then that process never got stuck (3 months in now)
Anything else?
I suspect that max_num_messages and max_num_bytes are treated at the same priority as per
https://pulsar.apache.org/api/python/3.0.x/pulsar.ConsumerBatchReceivePolicy.html
but timeout is at a lower priority which might cause some deadlock
Are you willing to submit a PR?
- I'm willing to submit a PR!
- 主要言語
- C++
- スター
- 72
- フォーク
- 93
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/pulsar-client-cpp のほかの issue
-
難易度 3/5 半日 初心者へのやさしさ 62/100
apache/pulsar-client-cpp#623 ·
-
[Bug] MessageTest fails to build with GCC 15.3.0 and 16.2.1 (-Werror=stringop-truncation)対応中かも @davlgd が 3 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
apache/pulsar-client-cpp#621 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
apache/pulsar-client-cpp#620 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
apache/pulsar-client-cpp#619 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
apache/pulsar-client-cpp#618 ·
apache/pulsar-client-cpp の issue をすべて見る
似ている issue
-
bug core p3
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
RunanywhereAI/runanywhere-sdks#1258 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
JdeRobot/RoboticsInfrastructure#843 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
ai-quokka-wannabe/tron-grid-lite#180 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cython/cython#8110 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
PR bot doesn't recognize hip-tests as a unit test directory対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ROCm/rocm-systems#14923 ·
メンテナーはふだん 2 日以内に返信