Skip to content

compute: default arrangement dictionary compression gate on - #38195

Merged
antiguru merged 2 commits into
mainfrom
claude/enable-arrangement-dictionary-compression-default
Aug 13, 2026
Merged

antiguru merged 2 commits into
mainfrom
claude/enable-arrangement-dictionary-compression-default

Conversation

@claude

@claude claude Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Moritz Hoffmann · Slack thread

Before: a self-managed deployment had arrangement dictionary compression off even on a cluster with EXPERIMENTAL ARRANGEMENT COMPRESSION set. The environment-wide gate defaults off, and self-managed has no LaunchDarkly to flip it, so there was no way to turn the feature on at all.

After: the environment-wide gate defaults on, so the per-cluster EXPERIMENTAL ARRANGEMENT COMPRESSION option is the only knob. This also aligns the out-of-the-box default with cloud, where LaunchDarkly already serves true.

How: the compiled-in default of the enable_arrangement_dictionary_compression_alpha dyncfg (ENABLE_ARRANGEMENT_DICTIONARY_COMPRESSION_ALPHA in src/compute-types/src/dyncfgs.rs) changes from false to true. That is the whole functional change; the surrounding doc comment is updated to record why the default is on. The gate is consumed in ComputeController::add_replica (src/compute-client/src/controller.rs), where it is ANDed with the per-cluster config.arrangement_compression to produce ReplicaConfig::arrangement_dictionary_compression. The AND is untouched, so a cluster that does not request compression still gets none.

Caveat: the environment-wide gate is read once at replica creation and is not part of ReplicaShape, so existing replicas do not pick up the change until they are recreated (restart, resize, or cluster reconfiguration).

Motivation

Self-managed customers cannot enable arrangement dictionary compression today. The feature is gated by two independent switches that are ANDed together at replica creation: the environment-wide dyncfg enable_arrangement_dictionary_compression_alpha, and the per-cluster SQL option EXPERIMENTAL ARRANGEMENT COMPRESSION. In cloud the dyncfg is set to true through LaunchDarkly, so only the cluster option matters in practice. Self-managed has no LaunchDarkly and therefore falls back to the compiled-in default, which is false, leaving the AND permanently false regardless of how the cluster is configured. Flipping the compiled-in default makes the cluster option the single knob everywhere.

Requested in the Slack thread linked above.

Description

One-line functional change in src/compute-types/src/dyncfgs.rs:

pub const ENABLE_ARRANGEMENT_DICTIONARY_COMPRESSION_ALPHA: Config<bool> = Config::new(
    "enable_arrangement_dictionary_compression_alpha",
    true,   // was: false
    "Enable arrangement dictionary compression (alpha; not yet production-ready).",
);

The _alpha name and the description are deliberately left alone: this changes the default of the gate, not the maturity of the feature, and the flag remains a kill switch that can be set to false to disable compression on new or restarted replicas regardless of per-cluster configuration.

The doc comment previously asserted "default off" as part of its disposition note, which would now be wrong, so it is corrected and gains a short note on why the compiled-in default is the one that matters for a deployment without LaunchDarkly.

Notes for the reviewer:

  • Existing replicas are unaffected. ComputeController::add_replica captures the dyncfg once and stores it in ReplicaConfig, and the value is not part of ReplicaShape, so no reconciliation is triggered by the flip. Only replicas created after the upgrade see the new default.
  • The per-cluster option default is unchanged. EXPERIMENTAL ARRANGEMENT COMPRESSION still defaults to false (src/sql/src/plan/statement/ddl.rs, experimental_arrangement_compression.unwrap_or(false)), so no existing cluster starts compressing as a result of this PR. Compression is still strictly opt-in per cluster.
  • CI behavior is unchanged. misc/python/materialize/mzcompose/__init__.py pins enable_arrangement_dictionary_compression_alpha to "false" in the shared mzcompose settings, so the default flip does not silently turn compression on across the mzcompose test suites. That pin is left as-is in this PR; whether it should now be dropped, or flipped to true per the repo guidance that feature flags default on in test configuration, is a separate decision.

Verification

No test expectations depend on this default:

  • test/testdrive/arrangement-dictionary-compression.td sets the flag explicitly with ALTER SYSTEM SET ... = true before creating its cluster, so it is insensitive to the default. Its trailing ALTER SYSTEM RESET now resets to true rather than false, which is only cleanup at the end of the file.
  • The .slt expectations that mention EXPERIMENTAL ARRANGEMENT COMPRESSION = false (test/sqllogictest/cluster.slt, managed_cluster.slt, materialized_views.slt) render the per-cluster option, not the dyncfg, and that option's default is unchanged.
  • No Rust unit test asserts this dyncfg's default; the clusterd-test-driver cases in src/clusterd-test-driver/src/text.rs pass the value explicitly.
  • misc/python/materialize/parallel_workload/action.py already flips this flag across both values, so it keeps exercising both paths.

cargo check could not be run in this environment (a git dependency, MaterializeInc/async-compression, is outside the sandbox's authorized repository set, so dependency resolution fails before compiling). rustfmt --check on the touched file is clean. The change is a bool literal in a const initializer plus a doc comment, so compilation risk is nil; CI will confirm.

One thing worth a second pair of eyes: test/launchdarkly-flag-consistency fails when a flag's production LaunchDarkly default differs from the compiled-in default unless the flag is allowlisted, and enable_arrangement_dictionary_compression_alpha currently appears in neither INTENTIONAL_LD_OVERRIDES nor KNOWN_CROSS_ENV_DIVERGENCES. If production LaunchDarkly serves true as its flag default, this PR removes a discrepancy and the check stays green. If cloud instead has it on via a targeting rule while the served default is still false, this PR creates a new discrepancy there. Someone with LaunchDarkly access should confirm which it is.

Note on launchdarkly-flag-consistency

That check lives in the Nightly pipeline (ci/nightly/pipeline.template.yml), not the test pipeline, so it did not run on this PR. It compares a flag's compiled-in default against the production LaunchDarkly default and allowlists known divergences. This flag appears in neither INTENTIONAL_LD_OVERRIDES nor KNOWN_CROSS_ENV_DIVERGENCES. If LaunchDarkly's served default is already true, this change removes a divergence and Nightly stays green. If cloud is enabled via a targeting rule while the served default is still false, this change introduces one, and Nightly will need either the LaunchDarkly default updated or an allowlist entry.


Generated by Claude Code

Flip the compiled-in default of the environment-wide dyncfg
`enable_arrangement_dictionary_compression_alpha` from false to true.

A deployment without LaunchDarkly runs on the compiled-in default, so with
the default off a self-managed deployment could not enable arrangement
dictionary compression at all, even on a cluster that sets EXPERIMENTAL
ARRANGEMENT COMPRESSION. Cloud already serves true for this flag via
LaunchDarkly, so this aligns the out-of-the-box default with cloud and
leaves the per-cluster option as the only knob.

The gate is read once at replica creation and is not part of ReplicaShape,
so existing replicas keep their captured value until they are recreated.

Co-Authored-By: Claude <[email protected]>
Claude-Session: https://claude.ai/code/session_015y1vTXBhMNwFSinPccnZCZ
@claude
claude Bot marked this pull request as ready for review August 13, 2026 13:58
@claude
claude Bot requested a review from a team as a code owner August 13, 2026 13:58
Comment thread src/compute-types/src/dyncfgs.rs Outdated
Comment on lines +454 to +459
///
/// The compiled-in default is on because it is what a deployment without
/// LaunchDarkly falls back to, and such a deployment would otherwise be unable
/// to enable the feature at all. This flag only gates the feature: compression
/// is active only on a cluster that also sets `EXPERIMENTAL ARRANGEMENT
/// COMPRESSION` (see `mz_compute_client::controller`).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This comment seems superfluous

@antiguru
antiguru merged commit 40a97b1 into main Aug 13, 2026
83 checks passed
@antiguru
antiguru deleted the claude/enable-arrangement-dictionary-compression-default branch August 13, 2026 14:34
@bosconi bosconi mentioned this pull request Aug 14, 2026
maheshwarip added a commit that referenced this pull request Aug 21, 2026
Dates in RC snapshots are provisional until the release ships. One
commit is added per snapshot; the final snapshot sets the real dates.

Snapshot drafts (with PR links) in mz-skills:
- rc.1:
[release_notes.md](https://github.com/MaterializeInc/mz-skills/blob/main/data/mz-release-notes/v26.38.0/rc.1/release_notes.md)
/
[omitted.md](https://github.com/MaterializeInc/mz-skills/blob/main/data/mz-release-notes/v26.38.0/rc.1/omitted.md)
- rc.2:
[release_notes.md](https://github.com/MaterializeInc/mz-skills/blob/main/data/mz-release-notes/v26.38.0/rc.2/release_notes.md)
/
[omitted.md](https://github.com/MaterializeInc/mz-skills/blob/main/data/mz-release-notes/v26.38.0/rc.2/omitted.md)
- rc.3:
[release_notes.md](https://github.com/MaterializeInc/mz-skills/blob/main/data/mz-release-notes/v26.38.0/rc.3/release_notes.md)
/
[omitted.md](https://github.com/MaterializeInc/mz-skills/blob/main/data/mz-release-notes/v26.38.0/rc.3/omitted.md)
- final:
[release_notes.md](https://github.com/MaterializeInc/mz-skills/blob/main/data/mz-release-notes/v26.38.0/final/release_notes.md)
/
[omitted.md](https://github.com/MaterializeInc/mz-skills/blob/main/data/mz-release-notes/v26.38.0/final/omitted.md)

**Borderline PRs omitted:** rc.1: 6 —
[omitted.md#borderline](https://github.com/MaterializeInc/mz-skills/blob/main/data/mz-release-notes/v26.38.0/rc.1/omitted.md#borderline),
rc.2: 1 —
[omitted.md#borderline](https://github.com/MaterializeInc/mz-skills/blob/main/data/mz-release-notes/v26.38.0/rc.2/omitted.md#borderline),
rc.3: 1 —
[omitted.md#borderline](https://github.com/MaterializeInc/mz-skills/blob/main/data/mz-release-notes/v26.38.0/rc.3/omitted.md#borderline),
final: 0 —
[omitted.md#borderline](https://github.com/MaterializeInc/mz-skills/blob/main/data/mz-release-notes/v26.38.0/final/omitted.md#borderline)

**Release dates (final): Cloud 2026-08-19, Self-Managed 2026-08-20.**
The `final` commit replaces the provisional pair (Cloud 2026-08-20,
Self-Managed 2026-08-21) in both `_index.md` and the
operator-compatibility YAML. The train was tagged on a Wednesday rather
than the Thursday the cadence estimate assumed, so both dates move one
day earlier — the same one-day-early pattern `v26.37.0` showed. **These
dates are inferred from the `v26.38.0` tag's commit date
(2026-08-19T16:31:34Z) plus one day for Self-Managed, not supplied
verbatim — please confirm them before merging.**

**What rc.2 added:** the Agent Skills section only (the `mz-deploy`
skill and the `mz-sql-lsp` Claude Code plugin, both from
`MaterializeInc/agent-skills`). rc.2's single materialize PR —
[#38241](#38241), a
cherry-pick — is held out as experimental; see the release-owner call
below.

**What rc.3 added:** nothing published — its commit is empty. rc.3's
window was four hours wide (it was cut the same afternoon as rc.2) and
held one PR,
[#38259](#38259),
which pins the builtin-schema migration step for
`mz_internal.mz_cluster_reconfigurations` to `26.38.0-rc.2` and so
repairs a startup assertion failure that rc.2's own cherry-pick (#38241)
had introduced. The defect was never in a released version and no
upgrade path into v26.38.0 passes through the broken state, so it is
omitted. The commit is recorded empty rather than skipped so the
branch's subject ledger carries every snapshot of the train.

**What final added:** the real dates and nothing else. The tracking
issue
[MaterializeInc/release#551](MaterializeInc/release#551)
lists no PRs, and `compare v26.38.0-rc.3...v26.38.0` contains exactly
one commit — the `materialize-bot` version bump — so no cherry-picks
landed on the release branch after rc.3. The window's 2 agent-skills PRs
are both repo automation and are omitted. The published content of this
release is therefore rc.1's 2 improvements and 10 bug fixes plus rc.2's
2 agent-skills entries.

**Needs a call from the release owner:**
- ~~[#38102](#38102)
(graceful resizing of system clusters) — confirm parts 1 and 2 ship in
v26.38.0.~~ **Resolved at the tag:** both #38102 and
[#38101](#38101) are
confirmed ancestors of `v26.38.0`, so the Improvements entry is correct
as published. The rest of rc.1's caveat still holds and was re-checked:
**part 3 (`WITH (WAIT FOR '0s')`, the escape hatch for operators who
cannot afford the overlap replica set) is not in this release** —
nothing after rc.1 added it. The published entry makes no claim about an
escape hatch, so no rewrite is needed.
- [#38195](#38195)
(arrangement dictionary compression) is **held out** as an experimental
gate, re-verified at the final tag:
`enable_arrangement_dictionary_compression_alpha` reads `true` but its
description still says "alpha; not yet production-ready", and the
per-cluster `EXPERIMENTAL ARRANGEMENT COMPRESSION` option still defaults
off. The flip does change something real for Self-Managed, where that
per-cluster option previously had no effect at all. If you want it
advertised, add to Improvements: "**Self-Managed: `EXPERIMENTAL
ARRANGEMENT COMPRESSION` on a cluster now takes effect**" — noting that
existing replicas do not pick it up until they are recreated.
- **rc.2 addition:**
[#38241](#38241) is
the same feature's graceful-reconfiguration fix — without it, an `ALTER
CLUSTER` on a compression-carrying cluster bounces the baseline replicas
mid-reconfiguration and leaves an empty `changes` diff in
`mz_internal.mz_cluster_reconfigurations`. It is reachable only behind
the same `_alpha` gate, so it is omitted alongside #38195. **Decide the
two together:** if the option is advertised, #38241 belongs in that
entry.
- **rc.3 addition:**
[#38259](#38259) is
what makes rc.2's #38241 start at all — without it, a server opening an
existing catalog aborts, since the migration step was registered at a
version ahead of the build. It does not change the decision above either
way; it only means the held-out code now runs. All three PRs should
still be decided as one. Given the "not yet production-ready"
description is unchanged at the release tag, the default reading is to
leave the feature unadvertised.
- The regex entry's new limit is a **stated break with released
behavior**: a machine-generated pattern carrying more than 2000
character classes (say 3000 `\d`) compiles on every released version and
does not compile here, and such a pattern inside an existing view
const-folds to an error literal, so the object still loads but queries
against it error. Consider whether that deserves its own call-out rather
than living inside a bug-fix bullet.

**Note on merge order:**
[#38100](#38100)
(v26.37.0 release notes) has since merged, so this branch — cut from
`main` before it — now conflicts, exactly as anticipated. The resolution
is trivial: the v26.38.0 section belongs above v26.37.0 at the top of
`_index.md`, and the v26.38 row above the v26.37 row in the
operator-compatibility YAML.

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: Pranshu Maheshwari <[email protected]>
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.

3 participants