Add raft scenarios for uncovered retirement and reconfiguration branches in raft.h

クローズ
#8,464 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@achamayou がすでに取り組んでいます。

2026年10月5日 から。

  • #8507 @achamayou による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp

調査の方向性

Start by reading src/consensus/raft/raft.h and the existing tests in tests/raft_scenarios/, especially scenarios added by #8433. Trace the three retirement, vote, and rollback branches and model the required multi-node interleavings. Done means scenarios cover all three branches and pass the CI trace validation against the TLA+ specification.

索引モデルが issue の本文から書いたものです。

説明

NOTE: This type of issue is reserved for the project team. If you are not a member of the team, please use either the bug or feature templates.

What is the motivation for this task
#8433 adds negative-path raft_test cases for src/consensus/aft/raft.h. Its description lists three retirement and reconfiguration interleavings that are reachable, but whose branches are still not covered by raft_test or raft_scenario_test:

  • commit(): a node whose retirement is Signed commits an index below retirement_committable_idx, so idx >= retirement_committable is false.
  • recv_propose_request_vote(): a ProposeRequestVote reaches a node whose retirement is committed, so !is_retired_committed() is false.
  • rollback(): a rollback removes every configuration, so the configuration rollback loop ends because configurations is empty.

These need multi-node interleavings, so they are better written as scenarios in tests/raft_scenarios/, which CI also trace-validates against the TLA+ spec, than as more raft_test fixtures. This was raised in review of #8433 and deferred from it.

Dependencies
None blocking. Measuring the coverage gain is simplest once #8433 has merged.

Describe impact if task is not completed
These raft.h branches stay untested by the consensus unit and scenario tests, so a regression in them would not be caught there, and they keep counting as missed branches in raft.h coverage.

主要言語
C++
スター
876
フォーク
264
平均マージ
1日 8時間
マージ済み PR(30日)
138

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/CCF のほかの issue

microsoft/CCF の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。