Skip to content

Allow a one-member sharded cluster to own regions - #113

Closed
austin-barrington wants to merge 1 commit into
mainfrom
feat/sharding-n1-legal-cluster
Closed

austin-barrington wants to merge 1 commit into
mainfrom
feat/sharding-n1-legal-cluster

Conversation

@austin-barrington

Copy link
Copy Markdown
Member

Summary

  • Bootstrap now uses RF = min(configured, live members), so a 1-node cluster with sharding on owns its first region (peers=[self], primary=self) even when configured RF is 3.
  • Adds one_member_cluster_owns_region_after_first_write (P1.1) plus unit coverage for the effective-RF helper.

Server defaults stay off. Operator follow-on (webhook + [cluster] enabled=true at replicas=1 with explicit sharding) is in hyperbytedb-operator.

Test plan

  • cargo test --lib (includes effective_rf_never_exceeds_membership, bootstrap_n1_peers_are_self)
  • cargo test --test sharding_cluster_integration one_member_cluster_owns_region_after_first_write
  • cargo fmt --check and cargo clippy --all-targets -- -D warnings

Made with Cursor

Bootstrap now takes RF = min(configured, live members), so n=1 gets peers=[self] even when configured RF is 3.
@cursor

cursor Bot commented Sep 4, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_7a854175-982a-4de7-b2f3-05fa3fcd62be)

@austin-barrington

Copy link
Copy Markdown
Member Author

Superseded by #115, which contains this commit as part of the full Phase 1 branch (verified: this head is an ancestor of #115). Closing unmerged — merging both would apply the same change twice, since a squash-merge here creates a new commit on main while #115 still carries the original.

@austin-barrington
austin-barrington deleted the feat/sharding-n1-legal-cluster branch September 7, 2026 07:27
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