[Enhancement] ControllerClosure request-completion semantics lack direct tests
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- java
調査の方向性
まず controller/src/main/java/org/apache/rocketmq/controller/impl/closure/ にある ControllerClosure.java を読み、OK ステータスの場合に ControllerResult からレスポンスがどのように組み立てられるか、失敗が CONTROLLER_JRAFT_INTERNAL_ERROR にどのように対応づけられるか、taskWithThisClosure() から得た Task がどのようにキャッシュされるかをメモしてください。セットアップの慣習は DLedgerControllerTest を参考にして、この3つの振る舞いをカバーする新しいテストクラスを controller モジュールのテストツリーに追加してください。OK のケース、失敗のケース、Task キャッシングのケースがそれぞれ通れば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
ControllerClosure (controller/src/main/java/org/apache/rocketmq/controller/impl/closure/ControllerClosure.java) decides how every JRaft-driven controller request completes:
- on
Status#isOk, it builds the response from theControllerResult(code, optional body, optional remark) and completes the future; - on failure, it maps any JRaft error to
ResponseCode.CONTROLLER_JRAFT_INTERNAL_ERRORwith the status message; taskWithThisClosure()caches a JRaftTaskwhosedoneis the closure and whose data is the encoded request.
None of this has direct test coverage — a search of the module shows no test touches ControllerClosure. A regression in the response mapping (dropped body/remark, wrong error code, un-cached task re-encoding, wrong closure binding) would not be caught by the existing DLedgerControllerTest / manager tests, which don't exercise request completion.
Expected behavior
Direct contract tests: OK status completes the future with the configured code/body/remark (and leaves body/remark unset when absent); a failed status completes with CONTROLLER_JRAFT_INTERNAL_ERROR and the JRaft error message; taskWithThisClosure() returns the same Task instance on repeat calls, bound to this closure, carrying the encoded request.
- 主要言語
- Java
- スター
- 22.6k
- フォーク
- 12k
- 平均マージ
- 4日 13時間
- マージ済み PR(30日)
- 20
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/rocketmq のほかの issue
-
[rocketmq-client-python] TransactionMQProducer allocates an unused producer during initializationオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
[Bug] notifyMasterOnline aborts the long-polling wake-up with a NullPointerException when an arrival drains a bucket first対応中かも @iloveeyjafjalla が 13 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/rocketmq#11441 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Enhancement] FilterFactory duplicate-registration and unregister semantics lack tests対応中かも @chennaji9 が 18 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
apache/rocketmq#11340 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[Enhancement] LogicExpression three-valued truth table and short-circuit behavior lack direct tests対応中かも @chennaji9 が 18 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/rocketmq#11339 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[Enhancement] SyncStateInfo defensive-copy and epoch semantics lack direct tests対応中かも @chennaji9 が 18 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/rocketmq#11338 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
apache/rocketmq の issue をすべて見る
似ている issue
-
agent:working bug follow-up lane:auto
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Sanne/incus-spawn#1765 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
checkstyle/checkstyle#22260 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
strimzi/strimzi-kafka-operator#13328 · コメント 1 件 · リアクション 3 件 ·
メンテナーはふだん 1 日以内に返信