Skip to content

feat: build shared cell-group multi-Raft runtime - #160

Open
forhappy wants to merge 713 commits into
mainfrom
codex/shared-cell-groups
Open

forhappy wants to merge 713 commits into
mainfrom
codex/shared-cell-groups

Conversation

@forhappy

@forhappy forhappy commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Cellar SQL cells share RF3 Raft groups while retaining independent SQLite state, receipts, versions and effects.

This update fixes command admission during concurrent apply: commands wait for committed entries before entering SQL, keep their original deadline and obtain fresh execution authority. It fixes child receipt replay during split/merge without repeating callbacks or relaxing quorum and fencing checks. The PR also includes node-owned automatic partition scheduling and durable recovery of selected work.

Validation: 187 native execution tests pass (two process-fixture helpers ignored). Ten native transition cases and four real RustFS cases pass in both image modes. Strict all-target Clippy and repository checks pass. Earlier failing runs are retained with their source revisions. RustFS uses host-native TLS voters; independent failure domains and sustained load remain open.

CG-11 remains open: safe cancellation/recovery of staged work and competing selections, adaptive whole-group placement, configured startup, reserve and bounded fanout. The full CG-12–16 lifecycle and release gates also remain open.

Includes latest origin/main (981a5417). See progress and remaining priorities.

@forhappy forhappy changed the title docs: select shared cell groups as the Raft replacement docs: add executable cell-group multi-Raft delivery plan Oct 29, 2026
@forhappy forhappy changed the title docs: add executable cell-group multi-Raft delivery plan feat: add cell-group identities and version contracts Oct 29, 2026
@forhappy forhappy changed the title feat: add cell-group identities and version contracts feat: define cell-group multi-Raft delivery and wire contracts Oct 29, 2026
@forhappy forhappy changed the title feat: define cell-group multi-Raft delivery and wire contracts feat: build cell-group contracts and manifest storage Oct 29, 2026
@forhappy forhappy changed the title feat: build cell-group contracts and manifest storage feat: persist cell-group manifests through Raft Engine Oct 29, 2026
@forhappy forhappy changed the title feat: persist cell-group manifests through Raft Engine feat: persist and incrementally prepare cell-group manifests Oct 29, 2026
@forhappy forhappy changed the title feat: persist and incrementally prepare cell-group manifests feat: persist cell-group manifests with retention and reclamation Oct 29, 2026
@forhappy forhappy changed the title feat: persist cell-group manifests with retention and reclamation feat: build cell-group durability and enrollment Oct 29, 2026
@forhappy forhappy changed the title feat: build cell-group durability and enrollment feat: build cell-group durability, enrollment and range directory Oct 29, 2026
@forhappy forhappy changed the title feat: build cell-group durability, enrollment and range directory feat: build cell-group durability, routing and lazy birth metadata Oct 29, 2026
@forhappy forhappy changed the title feat: build cell-group durability, routing and lazy birth metadata feat: build cell-group storage and routing foundations Oct 29, 2026
@forhappy forhappy changed the title feat: build cell-group storage and routing foundations feat: add physical cell-group bootstrap and storage foundations Oct 29, 2026
@forhappy forhappy changed the title feat: add physical cell-group bootstrap and storage foundations feat: deliver cell-group multi-Raft plan and foundations Oct 29, 2026
@forhappy forhappy changed the title feat: deliver cell-group multi-Raft plan and foundations feat: add cell-group routing and durable enrollment foundations Oct 29, 2026
@forhappy forhappy changed the title feat: add cell-group routing and durable enrollment foundations feat: add cell-group consensus and durable state foundations Oct 30, 2026
@forhappy
forhappy marked this pull request as ready for review October 30, 2026 00:50
@forhappy forhappy changed the title feat: add cell-group consensus and durable state foundations feat: add shared cell-group runtime foundations Oct 30, 2026
@forhappy forhappy changed the title feat: add shared cell-group runtime foundations feat: add shared cell-group consensus and SQL foundations Oct 30, 2026
@forhappy forhappy changed the title feat: add shared cell-group consensus and SQL foundations feat: add shared cell-group consensus and bounded SQL workers Oct 30, 2026
@forhappy forhappy changed the title feat: add shared cell-group consensus and bounded SQL workers feat: add shared cell-group consensus and SQL recovery Oct 30, 2026
@forhappy forhappy changed the title feat: add shared cell-group consensus and SQL recovery feat: add shared cell-group consensus and registered execution Oct 30, 2026
@forhappy forhappy changed the title feat: add shared cell-group consensus and registered execution feat: add shared cell-group consensus, execution and transport Oct 30, 2026
@forhappy forhappy changed the title feat: add shared cell-group consensus, execution and transport feat: build shared cell-group multi-Raft runtime Oct 31, 2026
@forhappy
forhappy marked this pull request as draft November 3, 2026 07:45
forhappy added a commit that referenced this pull request Nov 3, 2026
BREAKING CHANGE: canonical SDK and fleet consumers use shared physical
cell groups with independent logical cell histories. Retired per-cell
APIs have no compatibility path.

Publish the cutover checkpoint and its MVP acceptance scope. Public
consumer ports, managed S3 activation and complete build, lint and backend
gates remain unfinished; keep PR #160 in draft.

Refs #160
forhappy added a commit that referenced this pull request Nov 3, 2026
Keep replica attempts in one invocation, original deadline and attempt
bank. Physical SQL and transport retain admission until joined; leader
advice never replaces destination authorization.

Normalize the exact SQL deadline envelope so timer races cannot change
fallback behavior. Drain example Node producers before sampling the final
Raft quiescence report, preserving its existing success predicate.

BREAKING CHANGE: shared query replies carry authenticated leader advice
at marker 1. No predecessor wire reader is retained.

Refs #160
forhappy added a commit that referenced this pull request Nov 3, 2026
Use explicit namespace/archive provisioning and replicated enrollment.
Keep independent SQLite histories and receipts in one group per voter.
Preserve native/Axum read, token, retry and shutdown behavior.

Add the original public SDK shared-group gate with retained process
proofs. Other managed, ingress/admin and feature-off gates remain open.

BREAKING CHANGE: the counter uses logical histories and cell tokens.
Predecessor per-cell layouts are refused, without migration or fallback.
Replies distinguish cell sequence from physical commit witnesses.

Refs #160
forhappy added a commit that referenced this pull request Nov 3, 2026
Resolve the host conflict at the shared configuration surface. Adapt
upstream bulk-seed callbacks to logical cell history and retain the
complete metrics inventory assertions.

Preserve upstream replica, snapshot, shutdown and qualification changes.
Their applicability to the shared membership owner requires its own
qualification; a legacy replica fix is not proof for that path.

Refs #160
forhappy added a commit that referenced this pull request Nov 4, 2026
Resume exact seeded histories through an explicit fencing authority and a joined activation worker. Keep admission pending until real Raft activation applies, preserving original receipts and catalog intent.

Join public control services before infrastructure teardown on late startup refusal. Cover disk loss, retained restart, S3 minima and held-worker ownership.

Refs #160
forhappy added a commit that referenced this pull request Nov 4, 2026
Warm cached destinations bypassed buffered source validation.
Check source bytes before reuse, and reuse completed file/directory
barriers only within their open owner. Keep verifier files charged
under existing ceilings to avoid rebuilding every archive image.

Refs #160
A sampled ready leader can commit another cell before execution admission.
Wait for its durable apply prefix under the original request deadline,
then obtain fresh authority. Retry only before SQL has entered; keep
routing budgets, leader fences and exact producer reconciliation intact.
Treat ordinary Raft packet overload as a deferred delivery under the
existing pump deadline. Wait for actual reconciliation proofs after
leader change. Deliver a generated heartbeat before capturing its
100-ms source proof, then stop peer traffic through expiry checks.
Keep final state assertions, freshness and resource limits unchanged.
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