Skip to content

Remove dead code#7813

Merged
eddyashton merged 1 commit intomicrosoft:mainfrom
eddyashton:remove_dead_to_remove
Apr 10, 2026
Merged

Remove dead code#7813
eddyashton merged 1 commit intomicrosoft:mainfrom
eddyashton:remove_dead_to_remove

Conversation

@eddyashton
Copy link
Copy Markdown
Member

No description provided.

@eddyashton eddyashton requested a review from a team as a code owner April 10, 2026 13:46
Copilot AI review requested due to automatic review settings April 10, 2026 13:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes an unused “removal” block in AFT Raft’s node-state maintenance logic, reducing dead code in the consensus implementation.

Changes:

  • Delete an unused to_remove collection and associated loop in create_and_remove_node_state().
Comments suppressed due to low confidence (1)

src/consensus/aft/raft.h:2813

  • create_and_remove_node_state() no longer contains any removal logic (the only removal-related block was dead). The name is now misleading; consider renaming it (and updating call sites) to reflect its actual behavior, or implement the intended removal of nodes not present in any active configuration to match the name.
      // Add all active nodes that are not already present in the node state.
      for (auto node_info : active_nodes)
      {
        if (node_info.first == state->node_id)
        {

@eddyashton eddyashton merged commit 891a19c into microsoft:main Apr 10, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants