Add destination-level toggle controls - #3830
Conversation
Deployment notesKeeping this PR as the end-state reference; production should roll out in three phases:
The explicit |
Scope checkpointThis PR has grown because it moved from “add a destination toggle” to “guarantee cluster-wide, race-free lifecycle transitions under replica lag, cache gossip, WAL delivery, and process failures.” The product contract determines the appropriate scope:
The current implementation has been converging on the second contract. That is what pulled in cache generations, tombstones, WAL ordering, RPC reconciliation, locks, retries, and supervisor lifecycle changes. If the simple contract is sufficient, the PR can be reduced substantially:
If an immediate, hard cluster-wide cutoff is required, the current complexity is real, but it should be presented and split as distributed lifecycle infrastructure rather than treated as part of a small UI toggle. No pruning decision has been applied yet; this comment records the scope decision we should make before continuing. |
Summary
enabledflag for destinations and exposes it through the backend API and Backends LiveView index/show controls.PATCH {"enabled": false}is documented without requiringname,type, orconfig.Deployment
enabledthrough the API. Mixed-version nodes do not have the new reconciler or disabled-routing guards.On PostgreSQL 11+, adding this constant
DEFAULT true NOT NULLcolumn uses the fast-default path and does not rewrite existing rows. The statement should therefore be quick, though it still briefly takes anACCESS EXCLUSIVEtable lock.Related fixes
Cachex.del/2keySupervisor.which_children/1withEnum.find_value/2Those pre-existing fixes are isolated for independent review. Their overlapping diffs can be removed from this PR after they land and this branch is rebased.
Validation
mix format --check-formattedmix compile --warnings-as-errorsmix credo(no priority issues; existing design suggestions only)Linear: O11Y-2315