Skip to content

nodeconf: configuration epochs, change observers, config history store#721

Open
cheggaaa wants to merge 1 commit into
mainfrom
resharding
Open

nodeconf: configuration epochs, change observers, config history store#721
cheggaaa wants to merge 1 commit into
mainfrom
resharding

Conversation

@cheggaaa

@cheggaaa cheggaaa commented Jul 4, 2026

Copy link
Copy Markdown
Member

Groundwork for tree-node resharding (design: any-sync-node docs/resharding-plan.md).

Changes

  • Configuration.Epoch: monotonically increasing version assigned by the coordinator on every publish (0 = pre-epoch configs); exposed via a new epoch field in NetworkConfigurationResponse (+ regenerated coordinatorproto).
  • nodeconf.Service.ObserveChanges(observer): observers are called with the previous and new NodeConf whenever the active configuration is replaced (not for the initial one). The node's resharder uses this to trigger drain cycles immediately instead of waiting for a periodic timer.
  • nodeconf.HistoryStore (optional Store extension) + implementation in nodeconfstore: retains the last 100 epochs per network on disk. Used by nodes to recompute earlier rings after a restart mid-migration and to authenticate draining nodes that were already removed from the current configuration.

Companion PRs

Testing

  • new unit tests: observer dispatch (fires exactly once per change, not for the initial config), history store save/get/epochs/pruning
  • full repo test suite passes

🤖 Generated with Claude Code

https://claude.ai/code/session_01KDgytoFFikB7tY4oRreWom

…y store

- Configuration.Epoch: monotonic version set by the coordinator (0 = pre-epoch)
- NetworkConfigurationResponse.epoch in coordinatorproto (+ regen)
- nodeconf.Service.ObserveChanges: observers notified on config replacement
- nodeconf.HistoryStore + nodeconfstore retains last 100 epochs per network

Groundwork for tree-node resharding (see any-sync-node docs/resharding-plan.md).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KDgytoFFikB7tY4oRreWom
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

New Coverage 58.7% of statements
Patch Coverage 71.6% of changed statements (48/67)

Coverage provided by https://github.com/seriousben/go-patch-cover-action

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