doc: design for the cluster-controller legacy removal (reference only, do not merge) - #38175
Draft
aljoscha wants to merge 1 commit into
Draft
Conversation
…onfig paths Records the design the four changes below this one implement, and what the implementation settled that the design left open (the folded cut-over target, the reconcile-kernel reuse, and how a cut-over settles a carried record). Reference only, not intended to merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Not intended to merge. This sits on top of the stack purely as reference for
what the changes below it did and why. Read it first, merge it last or never.
If you'd rather it landed — the repo does keep design docs under
doc/developer/design/— say so and I'll move it to the bottom of the stack soit merges ahead of the code. There's a real argument for it: the "what stays,
and why" and "alternatives" sections answer questions that will come up again
the next time someone touches this area, and a commit message is a worse place
to keep them.
The stack, in merge order
Merged:
adapter: remove ENABLE_CLUSTER_CONTROLLER and the legacy REFRESH scheduleradapter: let the cluster controller own system clustersOpen:
adapter: delete the staged cluster reconfiguration machinesql: accept WITH (WAIT ...) on ALTER CLUSTER unconditionallyadapter: don't leak arrangement compression into the realized configadapter: let the synchronous cut-over change the replication factorWhat the design says
The cluster controller has been merged and default-on since v26.29, but it still
lived behind the
ENABLE_CLUSTER_CONTROLLERbreak-glass dyncfg, and systemclusters were excluded from its ownership. Those two facts kept three legacy code
paths alive: the REFRESH scheduler, the staged (
WaitForHydrated/Finalize/-pending) reconfiguration machine, and the sequencer's own replica create/dropimplementation for system clusters.
The doc walks each part, and carries two sections that are the reason it exists
at all rather than being folded into commit messages: "What stays, and why"
(the four things that look deletable and are not) and "Alternatives" (in
particular why deleting the direct reshape path entirely was rejected, which is
the load-bearing decision in part 3).
Amended to match what shipped
The design left some things open that the implementation had to settle, and one
thing it specified turned out to be wrong. Both are recorded here, so the
document describes what we built rather than what we first proposed:
config". A statement that mentions one shape dimension while a reconfiguration
is in flight would then have silently reverted the in-flight transition along
every dimension it did not mention. Both paths now share
alter_reconfiguration_target.the observed owned replica set and recreate it", which would cold-restart a
replica that already had the target shape, making a forced commit of a
stuck-but-hydrating resize more disruptive than letting the controller do it.
That contradicts the design's own "same outcome, minus the tick"
justification, so the cut-over converges via the controller's
reconcile_replicaskernel.unconditionally. It settles
Finalized { forced: true }when the cut-overlanded on the record's own target, and
Cancelledotherwise.Known gap, tracked elsewhere
The synchronous cut-over still decides its replica set from a hand-built
baseline-only desired set rather than the controller's full strategy set, so it
drops an in-flight hydration-burst replica that the controller would have kept
(found in review on #38103). The record survives and the controller re-creates
the replica on the next tick, so it's a cold bounce rather than a strand, and
the old code path did the same thing. Fixing it properly means sharing the
decision function, which is worth doing structurally rather than patching the
symptom.