compute: turn the interactive runtime on in test configurations - #38393
compute: turn the interactive runtime on in test configurations#38393antiguru wants to merge 3 commits into
Conversation
7cc7c1e to
edb0ed3
Compare
edb0ed3 to
33f6773
Compare
33f6773 to
2f0fd74
Compare
2f0fd74 to
69cfb34
Compare
69cfb34 to
51bbf8a
Compare
…nt sharing (MaterializeInc#38396) Replaces MaterializeInc#37881, whose head branch lives on a fork and so cannot be the base of a stacked PR in this repository. Same commits, same tree, on an upstream branch instead. This is the root of the stack MaterializeInc#38386 through MaterializeInc#38393, which splits MaterializeInc#37770. ### Motivation Cross-runtime arrangement sharing (the two-runtime read-isolation work, MaterializeInc#37770) needs batches readable from a thread other than the one maintaining the trace. Differential's default spines reference-count batches with `Rc`, which is worker-local. ### Description Introduce `mz_row_spine::ArcBatch`, a local newtype around `Arc<B>` that carries differential's batch traits (the orphan rule forbids the blanket impl on a bare `Arc<B>`), and switch the production spines and their builders — `RowRowSpine`, `RowValSpine`, `RowSpine`, `ValRowSpine`, `ColValSpine`, `ColKeySpine` — from `Rc`/`RcBuilder` to `ArcBatch`/`ArcBuilder`. An `Arc`-backed batch whose contents are `Send + Sync` can be read across threads, which `Rc` cannot do. Only the batch handle becomes atomic; the batch contents are unchanged, so the cost is a marginally more expensive refcount. Also adds generic `ArcOrdVal`/`ArcOrdKeySpine` aliases for callers outside `mz_compute`, adapts batch-size logging (`log_arrangement_size_inner`) to reach through the newtype to the inner `Arc`, and switches the storage sink trace to the `Arc`-backed spine. Builds against released differential-dataflow 0.25 with no fork or `[patch.crates-io]`. ### Verification `cargo check --workspace` passes with no `Cargo.lock` churn. `relations.slt`'s golden is rewritten because the spine type name appears in operator names. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
51bbf8a to
4f02fc3
Compare
4f02fc3 to
099cda1
Compare
099cda1 to
be74eb0
Compare
be74eb0 to
4daa449
Compare
4daa449 to
ba882e6
Compare
ba882e6 to
0d948f9
Compare
0d948f9 to
fc3dd5a
Compare
fc3dd5a to
7e51333
Compare
|
Confirmed and fixed in 7e51333. The same commit fixes the An assertion that distinguishes the two runtimes is still missing; the interactive runtime's introspection is unreachable (CPU-222), so there is nothing to read yet. Posted by Claude Code. |
7e51333 to
81d228a
Compare
QA LLM Review1. MEDIUM -- two-runtime query-dataflow spec cannot reach the unbacked publication point it documents
The scenario the spec is built around, the interactive import binding to an unbacked publication point that Details
The driver sends commands without waiting for an ack ( The script cannot simply be reordered: |
81d228a to
872ae4f
Compare
|
Confirmed:
Posted by Claude Code. |
872ae4f to
67d7101
Compare
3fd0fd7 to
53fa56a
Compare
53fa56a to
e7707d8
Compare
e7707d8 to
d196fa0
Compare
d196fa0 to
6e98212
Compare
6e98212 to
4b255fe
Compare
`enable_compute_interactive_runtime` becomes a variable system parameter defaulting to on, which is what makes every preceding piece of this work reachable: sqllogictest, testdrive, and the mzcompose suites now provision replicas with two runtimes, so peeks and bounded transient dataflows route to the interactive runtime and maintenance publishes its indexes for it to read. Production keeps the dyncfg's own default, which is off. The clusterd mzcompose service grows the second runtime's port and `--interactive-compute-timely-config`, mirroring what the controller passes in a real deployment, and the local driver runner takes `INTERACTIVE_COMPUTE=1` for the same. Four clusterd-test-driver specs cover the runtime boundary: an index read, a query dataflow that binds before its index is published, a read through an index that re-exports another's arrangement and so aliases its publication point, and a query dataflow that binds to such a re-export before it renders, which is the one case where the re-export has to publish through an import. The `ReadIsolationUnderHydration` parallel-benchmark scenario A/Bs the flag, measuring peek latency with the feature on against off while hydration saturates the maintenance workers. Three goldens move. `relations.slt` gains the publisher operators, which are real operators the maintenance runtime now installs on every published index. `introspection-sources.td` raises a coarse arrangement-size bound from 16 KiB to 32 KiB, because publication raises the reported size of a one-record index past the old bound. Whether that overhead is constant per arrangement or scales with size is not established and wants re-measuring, so the comment records the measurement without claiming a mechanism. `singlereplica_attribution_sources.slt` asserted a materialized view's timely dataflow id, which counted the peek dataflows rendered before it. Those now render on the interactive runtime, so the assertion is reduced to the id-to-collection pairing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VDm7opomJLxbNUEP3r9BLk
A query dataflow that imports a maintenance index and exports it under a transient id with the same key finds the imported shared arrangement at its export, which the interactive runtime now publishes as an alias of the index's publication point. The spec peeks the transient id, which only resolves if the alias reaches the shared arrangement. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VDm7opomJLxbNUEP3r9BLk
The publisher sink showed up in `relations.slt` as an operator and a channel per published index, and doubled the reported size of a one-record index in `introspection-sources.td`. The trace wrapper adds neither, so both files return to their expectations on main, and `relations.slt` no longer pins the runtime flag. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VDm7opomJLxbNUEP3r9BLk
4b255fe to
0141e18
Compare
Last of eight PRs splitting #37770. Stacks on #38392. Tracked by CPU-216.
enable_compute_interactive_runtimemoves out ofUNINTERESTING_SYSTEM_PARAMETERS, where #38391 parked it, and becomes a variable system parameter defaulting to on. That is what makes every preceding piece reachable: sqllogictest, testdrive, and the mzcompose suites provision replicas with two runtimes. Parallel-workload'sFlipFlagsActionis unpinned to both values at the same time. Production keeps the dyncfg's own default, off.The clusterd mzcompose service grows the second runtime's port and
--interactive-compute-timely-config, and the local driver runner takesINTERACTIVE_COMPUTE=1for the same. Four clusterd-test-driver specs cover the runtime boundary: an index read, a query dataflow that binds before its index is published, a read through an index that re-exports another's arrangement and so aliases its publication point, and a query dataflow that binds to such a re-export before it renders, the one case where the re-export publishes through an import instead. The driver gains two things the binding-first specs need.create-dataflowtakesuntil=, and the specs setuntil = as_of + 1, without which the dataflow is not single-time and the multiplexer routes it to maintenance.create-dataflow ... deferregisters a dataflow's exports without submitting it andsubmit-dataflowsubmits it later, so a spec can create and schedule the interactive dataflow before the index it imports exists. Its import then binds to an unbacked publication point that the later maintenance render adopts, which is the ordering the registry exists for and which a race could otherwise only reach by accident.read_at_max_timestamp.sltcovers reads atTimestamp::MAX, the one single-time shape whoseuntilis empty and so the one thatis_peek_dataflowadmits while!until.is_empty()would have rejected. Such a read is answerable only against a collection that has sealed, since no finiteupperpassesMAX, so the file reads off constant-backed indexes, whose dataflows have no inputs and drop their capability after emitting once. Both shapes are covered: a fast-path index peek, and a join that cannot take the fast path and so builds a peek dataflow importing two shared indexes. The reads double as the assertion that those indexes sealed, since a peek finding a live frontier would never return. Passes with the flag defaulted either way.relations.sltgains the publisher operators, and pins the flag itself rather than inheriting the environment default. A variable system parameter can be flipped byCI_SYSTEM_PARAMETERS=random, which would otherwise make the golden mismatch about half the time in randomized runs. The flag is read when a replica is provisioned, and the file creates its own cluster afterreset-server, so setting it beforehand is enough.introspection-sources.tdraises a coarse arrangement-size bound from 16 KiB to 32 KiB, since publication doubles the reported size of a one-record index.singlereplica_attribution_sources.sltasserted a materialized view's timely dataflow id, which counted the peek dataflows the replica rendered before it. Those now render on the interactive runtime, so the assertion is reduced to the id-to-collection pairing.The
ReadIsolationUnderHydrationparallel-benchmark scenario from #38542 A/Bs the flag, measuring peek latency with the feature on against off while hydration saturates the maintenance workers.