You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
adapter: let the synchronous cut-over change the replication factor
Changing a cluster's replication factor while a graceful reconfiguration is in
progress is refused, because the record captures a target factor when written
and the controller's cut-over writes it back to the realized config a tick
later. A factor change applied independently in the meantime would be silently
clobbered, with nothing in the ALTER's response to say so.
That reasoning does not reach the synchronous cut-over. It folds the factor into
the target it transacts and retires the record in the same transaction, and no
consumer reads a retired record's target: `desired_replicas`, `target_hydrated`
and the controller's own cut-over all sit behind `is_in_progress()`. There is no
later cut-over left to clobber the write, so exempt it.
The refusal cost the escape hatch its most useful shape. Forcing a wedged resize
through while scaling down had to be two statements, and between them the
cluster ran the old factor at the new size, the most expensive combination
available, exactly while an operator is firefighting. `fold_reconfiguration_target`
already computed the right answer for a re-targeted factor; only the guard made
that branch unreachable.
The escape hatch is the only exemption. A zero-timeout rollback still leaves a
record in flight to settle on a tick, so it keeps the refusal, and the error hint
now points at the cut-over as the third way out.
The cut-over section gains the wedged case: the refusal still fires without a
`WAIT`, and a combined size-and-factor cut-over lands both dimensions, converges
the replica set, and settles the record `cancelled` because the record's own
target factor was abandoned. The existing factor case ran with no record in
flight, which is why this gap held.
Also drops `Op::UpdateClusterReplicaConfig`. Deleting the staged reconfiguration
machine removed its last producer, leaving the variant, its apply arm and its
audit match arm dead.
0 commit comments