Skip to content

compute: capture arrangement_dictionary_compression on the replica#37290

Open
antiguru wants to merge 1 commit into
MaterializeInc:mainfrom
antiguru:claude/funny-volta-hduk2q
Open

compute: capture arrangement_dictionary_compression on the replica#37290
antiguru wants to merge 1 commit into
MaterializeInc:mainfrom
antiguru:claude/funny-volta-hduk2q

Conversation

@antiguru

Copy link
Copy Markdown
Member

arrangement_dictionary_compression was passed via CreateInstance, baked into InstanceConfig from the controller's dyncfg at replica creation. After an environmentd restart the controller re-derives the value, so a flag flip in between made the reconciled CreateInstance differ from what the running replica was created with, risking an unnecessary replica restart.

This moves the value out of CreateInstance. The replica now captures the first value it observes from a configuration update and holds it fixed for its lifetime, mirroring it into the process-global DICTIONARY_COMPRESSION. The reduced command history always orders UpdateConfiguration before any CreateDataflow, so the value is latched before any arrangement is built. The flag is also declared ParameterScope::Replica so it can be overridden per-replica.

Fixes CLU-135.

@antiguru antiguru force-pushed the claude/funny-volta-hduk2q branch 2 times, most recently from c505fd7 to 41027a5 Compare June 25, 2026 08:18
Comment thread src/clusterd-test-driver/src/driver.rs Outdated
Comment thread src/clusterd-test-driver/src/driver.rs Outdated
Comment thread src/compute-client/src/protocol/command.rs
Comment thread src/compute-client/src/protocol/command.rs Outdated
Comment thread src/compute-client/src/controller.rs Outdated
Comment thread src/compute-types/src/dyncfgs.rs Outdated
Comment thread src/compute/src/compute_state.rs Outdated
Comment thread src/compute/src/compute_state.rs Outdated
@antiguru antiguru force-pushed the claude/funny-volta-hduk2q branch from 41027a5 to c50a7af Compare June 25, 2026 08:27
Comment thread src/compute/src/compute_state.rs
@antiguru antiguru force-pushed the claude/funny-volta-hduk2q branch from c50a7af to 16786f9 Compare June 25, 2026 19:08
`arrangement_dictionary_compression` was passed via `CreateInstance`,
baked into `InstanceConfig` from the controller's dyncfg at replica
creation. After an environmentd restart the controller re-derives the
value, so if the flag was flipped in between, the reconciled
`CreateInstance` carried a different value than the running replica was
created with -- a difference that risks an unnecessary replica restart.

Move the value out of `CreateInstance` entirely. The replica now
captures the first value it observes from a configuration update (in
`handle_update_configuration`) and holds it fixed for its lifetime,
mirroring it into the process-global `DICTIONARY_COMPRESSION`. The
reduced command history always orders `UpdateConfiguration` before any
`CreateDataflow`, so the value is latched before any arrangement is
built. The flag is also declared `ParameterScope::Replica` so it can be
overridden per-replica.

Drops `arrangement_dictionary_compression` from `InstanceConfig` and
`ReplicaConfig` (and the controller capture / specialize_command path),
and the clusterd test driver now pushes it as a dyncfg instead.

Fixes CLU-135.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LBErWUhZR4sBuEfGStb5FP
@antiguru antiguru force-pushed the claude/funny-volta-hduk2q branch from 16786f9 to 6b71709 Compare June 25, 2026 19:44
@antiguru antiguru marked this pull request as ready for review June 25, 2026 19:48
@antiguru antiguru requested a review from a team as a code owner June 25, 2026 19:48
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.

2 participants