WorkerProcess passes None poll intervals to the backend, breaking acquire in the consumer thread
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python, redis
- 領域
- backend, databases, testing-qa
調査の方向性
tests/test_executor.py:_make_worker() と WorkerProcess.run() から始め、次に poll 間隔が使用されている RedisTaskBackend.acquire() を調べます。関連する executor テストを実行し、デフォルトの polling で acquire に None として到達しなくなったこと、および consumer thread が未処理の TypeError なしに完了することを確認します。
索引モデルが issue の本文から書いたものです。
説明
Found by testJoe while adding coverage for the fair multi-queue rotation (codingjoe-fair-multi-queue-scheduling), and confirmed pre-existing (untouched by that diff):
defer: WorkerProcess.run() lets None poll overrides reach RedisTaskBackend.acquire, raising TypeError in the consumer thread. Pre-existing, untouched L297. [tests/test_executor.py]
QED
tests/test_executor.py:_make_worker()defaultspoll_intervalandpoll_max_intervaltoNoneand passes them intoWorkerProcess.WorkerProcess.run()assigns them to the backend (backend.poll_interval = self.poll_interval), so the backend's poll options becomeNone.RedisTaskBackend.acquire()computesint(self.poll_max_interval / self.poll_interval), which raisesTypeError: unsupported operand type(s)inside the consumer thread.
The suite only reports PytestUnhandledThreadExceptionWarning, so the failure is invisible today. Either treat None as "keep the backend default" in WorkerProcess, or make the test helper pass the real defaults.
- 主要言語
- Python
- スター
- 12
- フォーク
- 1
- 平均マージ
- 1日 1時間
- マージ済み PR(30日)
- 10
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
codingjoe/threadmill のほかの issue
-
難易度 2/5 半日 初心者へのやさしさ 84/100
codingjoe/threadmill#52 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
codingjoe/threadmill#51 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
codingjoe/threadmill#47 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
codingjoe/threadmill#55 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
codingjoe/threadmill#54 ·
codingjoe/threadmill の issue をすべて見る
似ている issue
-
documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
simonw/sqlite-utils#872 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100