Skip to content

[WIP] Refactor Consensus API and KV Interaction - #8190

Draft
Eddy Ashton (eddyashton) wants to merge 4 commits into
mainfrom
agents/issue-8184-implementation
Draft

[WIP] Refactor Consensus API and KV Interaction#8190
Eddy Ashton (eddyashton) wants to merge 4 commits into
mainfrom
agents/issue-8184-implementation

Conversation

@eddyashton

Copy link
Copy Markdown
Member

This pull request implements the changes required for Issue 8184, focusing on a refactor of the consensus API and its interaction with the KV store. The main objectives were to streamline the API, enhance clarity, and ensure thread safety.

Key Changes

  • Replaced broad consensus accessors with coherent ConsensusDetails snapshots.
  • Introduced a boolean parameter for the compact method in the KV store to indicate leadership status, removing the need for back-channel queries to the consensus layer.
  • Removed the ConsensusKvQueries interface, simplifying the API and reducing unnecessary dependencies.
  • Updated various call sites, including Raft and KV store interactions, to utilize the new method signatures.
  • Added regression tests to ensure the correctness of the new implementation.

Verification

  • Full build and all targeted unit tests passed successfully.
  • C++ formatting and OpenAPI validation checks were completed without issues.
  • Independent correctness review confirmed no findings.

These changes enhance the clarity and efficiency of the consensus and KV interactions while maintaining the integrity of the system.

@eddyashton Eddy Ashton (eddyashton) changed the title Implement Issue 8184: Refactor Consensus API and KV Interaction [WIP] Refactor Consensus API and KV Interaction Aug 20, 2026
Keep existing AFT and KV tests on test-owned convenience helpers while production consumers use coherent consensus details. Require Raft compaction to pass primary state explicitly and derive primary/backup stub behavior from constructor-selected state.\n\nRefs #8184

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@eddyashton
Eddy Ashton (eddyashton) force-pushed the agents/issue-8184-implementation branch from 669e8b6 to 2f95bdc Compare August 20, 2026 15:53
@eddyashton
Eddy Ashton (eddyashton) force-pushed the agents/issue-8184-implementation branch from 2f95bdc to de984a8 Compare August 20, 2026 15:54
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.

1 participant