Skip to content

Experimental series sharding (default off) - #112

Merged
austin-barrington merged 16 commits into
mainfrom
ex/sharding
Sep 4, 2026
Merged

austin-barrington merged 16 commits into
mainfrom
ex/sharding

Conversation

@austin-barrington

Copy link
Copy Markdown
Member

Summary

  • Adds experimental measurement-region sharding. It stays default-off (spec.sharding.enabled / ConfigMap); this is not a V1-stable claim.
  • Kind 6-node G0–G9 e2e passed after fixing three merge blockers: Raft voters stuck in Syncing 503'd /health and stalled StatefulSet OrderedReady; bootstrap last_split_at=0 let a hot region binary-split every scheduler tick; a coordinator that is not a region peer could not scatter SELECT/DELETE because it had no local catalog.
  • Kind reset now wipes hostPath raft/meta (PVC delete alone reused leftover shard maps). Split cooldown applies even above region_max_series.
  • Rust-skills pass on origin/main...HEAD: no new unsafe on product paths (existing disk_monitor.rs SAFETY comment only). Style nits in older commits are waived.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --no-deps -- -D warnings
  • cargo test --lib + cargo test --test '*' + cargo test -p hyperbytedb-cli
  • Kind sharding e2e G0–G9 E2E PASSED (G7 region-primary map confirmation timed out; write/query after pod recycle still passed)
  • GitHub CI: fmt → clippy → test

Do not merge until CI is green.

Made with Cursor

austin-barrington and others added 16 commits August 18, 2026 21:27
Route queries and writes through Active region peers with fallback metrics,
add automatic primary failover, and expand integration tests plus docs for
the experimental sharding data plane. Include perf bench scripts for
multi-node ingest/query validation.
Per-node ClickHouse MVs, scatter-gather backfill, all-region dest reads with
merge, transfer purge, and integration tests including Raft replication.
…reads.

Propagate mutation/replication failures as HTTP errors, split on max peer series_count, and read global COUNT from region primaries so a 6-node Kind cluster converges without per-pod CREATE DATABASE.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bootstrap was hardcoding region_id=1 for every measurement, causing
stale_epoch heartbeat rejections when multiple regions shared an ID.
Allocate from next_region_id, reject duplicates on apply, and document
the invariant plus clean-cluster kind runbook in deep-dive §15.
Park stuck split-transfers, replace dead region peers, and fail writes when the
primary is down instead of accepting them on a replica. Drop the ConfigMap
patch script in favor of operator spec.sharding and add e2e phase windows.
Align v1-stable-scope with CREATE MATERIALIZED VIEW on sharded clusters, and document the operator sharding spec that already exists on the CRD.
…inator scatter

Raft voters stuck in Syncing 503 /health and stalled OrderedReady; last_split_at=0 binary-split every tick; coordinators without a local catalog could not scatter SELECT/DELETE.
CI check_doc_links resolved those paths from docs/superpowers/plans/, so the docs/ prefixes missed clustering, advanced-features, and glossary.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Cursor Bugbot was not present on this run, so that signal was skipped; no applicable approval policy required human review and no unresolved automated findings were present. Reviewers were not assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@austin-barrington
austin-barrington merged commit fbc8c3e into main Sep 4, 2026
5 checks passed
@austin-barrington
austin-barrington deleted the ex/sharding branch September 4, 2026 17:05
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