Skip to content

feat: add shard split proto definitions, model types, and admin CLI#911

Merged
merlimat merged 2 commits intooxia-db:mainfrom
merlimat:shard-splitting-1
Mar 3, 2026
Merged

feat: add shard split proto definitions, model types, and admin CLI#911
merlimat merged 2 commits intooxia-db:mainfrom
merlimat:shard-splitting-1

Conversation

@merlimat
Copy link
Copy Markdown
Collaborator

@merlimat merlimat commented Feb 25, 2026

Design detailed in https://github.com/orgs/oxia-db/discussions/909

Change 1/3

Add the foundational types and interfaces for shard splitting:

  • Proto: SplitShard RPC in admin service, AddFollowerRequest.observer and target_shard fields in replication service
  • Model: SplitPhase enum (Init/Bootstrap/CatchUp/Cutover/Cleanup), SplitMetadata, ShardStatusDeleting, DeleteShardMetadata helper
  • Client: SplitShard method on Admin interface and implementation
  • CLI: oxia admin split-shard command
  • Admin server: SplitShard handler that delegates to coordinator

@merlimat merlimat force-pushed the shard-splitting-1 branch 2 times, most recently from 0f6988e to bd3cbb4 Compare February 27, 2026 02:09
Add gRPC service definitions and messages for shard split operations:
- SplitShard RPC in OxiaCoordination admin service
- Observer replication messages (AddFollower with observer flag,
  SendSnapshot for shard-to-shard bootstrap)
- SplitHashRange field in AddFollowerRequest for hash range propagation
- MetadataSplitHashRangeMin/Max constants for gRPC metadata

Add data model types for split state management:
- SplitPhase enum (Init, Bootstrap, CatchUp, Cutover, Cleanup)
- ClusterStatus fields for tracking active splits and child shards

Add admin CLI command (oxia admin split-shard) and client library
wrappers for triggering splits.

Signed-off-by: Matteo Merli <mmerli@apache.org>
@merlimat merlimat merged commit 18d657c into oxia-db:main Mar 3, 2026
5 checks passed
@merlimat merlimat deleted the shard-splitting-1 branch March 3, 2026 22:50
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