Skip to content

feat: raft consensus for cluster configuration - #33

Merged
kacy merged 1 commit into
mainfrom
feat/cluster-raft
Feb 6, 2026
Merged

feat: raft consensus for cluster configuration#33
kacy merged 1 commit into
mainfrom
feat/cluster-raft

Conversation

@kacy

@kacy kacy commented Feb 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • implements openraft integration for cluster configuration consensus
  • adds TypeConfig for raft node/entry type configuration
  • adds ClusterCommand enum for topology changes (add/remove node, assign slots, migrations)
  • adds Storage struct implementing RaftStorage trait with in-memory log and state machine
  • adds ClusterStateData and ClusterSnapshot for state serialization

Tested

  • cargo test -p ember-cluster - 41 tests pass
  • cargo test - 216 tests pass
  • cargo clippy -p ember-cluster - no warnings

Design considerations

  • uses single raft group for entire cluster (simpler than multi-raft per slot range)
  • in-memory storage for now; persistence can be added later
  • state machine tracks nodes, slots, and active migrations
  • migration workflow split into BeginMigration/CompleteMigration commands

adds openraft integration for cluster configuration consensus:
- TypeConfig defining raft node/entry types
- ClusterCommand enum for configuration changes
- ClusterSnapshot and ClusterStateData for state machine
- Storage implementation with RaftStorage trait
- tests for node management, slot assignment, and migration
@kacy
kacy merged commit 90ba3a2 into main Feb 6, 2026
5 checks passed
@kacy
kacy deleted the feat/cluster-raft branch February 7, 2026 20:06
kacy added a commit that referenced this pull request Feb 11, 2026
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