compute: launch a second, interactive compute runtime - #38391
Conversation
91defbe to
5eecaa4
Compare
5eecaa4 to
e6d27f4
Compare
| true, | ||
| "Aggressively downgrade input read holds for indexes on zero-replica clusters.", | ||
| ); | ||
| /// Whether to launch compute replicas with a second, interactive compute timely runtime. |
There was a problem hiding this comment.
Fixed. (Posted by Claude Code.)
a985417 to
3cc5402
Compare
3cc5402 to
15cc33c
Compare
9311614 to
eb80f6a
Compare
eb80f6a to
3767df8
Compare
3767df8 to
9fcfab0
Compare
9fcfab0 to
c929c6d
Compare
c929c6d to
8f441a1
Compare
8f441a1 to
67eb09f
Compare
| /// Parses through the dyncfg rather than `str::parse`, because a stored override is a var-format | ||
| /// string: `bool` values format as `on`/`off`, which `str::parse::<bool>()` rejects. Parsing it | ||
| /// the wrong way silently resolved `false` for an override every other surface reported as on. | ||
| pub fn replica_scoped_bool(&self, replica_id: ReplicaId, name: &str, default: bool) -> bool { |
There was a problem hiding this comment.
Could this be generic over the dyncfg and type?
There was a problem hiding this comment.
Yes, and it is a strict improvement. Now replica_scoped<D: ConfigDefault>(&self, replica_id, config: &Config<D>) -> D::ConfigType.
The dyncfgs.entry(name) lookup and the ConfigVal::Bool match both disappear, because D::ConfigType::parse is directly callable. That also keeps the on/off behavior structurally rather than by comment: <bool as ConfigType>::parse handles those spellings itself, which is exactly the hazard the old doc paragraph was about.
Both call sites already passed NAME.name() and NAME.get(dyncfgs), so three arguments collapse to one and a name/default mismatch stops being expressible.
One detail worth flagging: the fallback reads config.get(dyncfgs), not config.default(). The former is the environment value including a production flag flip; the latter is the compile-time constant, and using it would silently ignore such a flip. There is a comment on that line saying so.
Posted by Claude Code.
67eb09f to
dda7a03
Compare
dda7a03 to
5bc0d2f
Compare
5bc0d2f to
22f0428
Compare
22f0428 to
840ff11
Compare
840ff11 to
ed4c0a8
Compare
QA LLM Review1. MEDIUM -- turning
|
ed4c0a8 to
a32a396
Compare
a32a396 to
dbc15b0
Compare
dbc15b0 to
05c4aa2
Compare
05c4aa2 to
329e8fb
Compare
QA LLM Review1. MEDIUM -- a published index never compacts: nothing advances the standing hold
With DetailsThe chain, all of it new with the flag (
Nothing calls the advancing entry point. A grep of the tree finds Both ends of the mechanism document a call that does not exist. Fix: have |
With `--interactive-compute-timely-config`, clusterd runs two compute runtimes in one process: the first takes the `Maintenance` role, the second `Interactive`, and both share the one sharing registry so a reader on worker `i` of either finds the slot a publisher on worker `i` of the other filled. The two must span an equal number of Timely peers, which the config preparation asserts, because the registry pairs workers by ordinal and reads are sound only if both shard keys across the same peer count. Without the flag the process runs a single `Solo` runtime and is byte-unchanged from a deployment that has no second runtime. One controller endpoint still fronts the replica. With two runtimes a `Multiplexer` serves it, routing each command to the owning runtime and merging responses; with one, the maintenance client builder serves it directly. Shared fate is the read-hold mechanism. Both runtimes' worker and reader threads are covered by the process-global panic hook installed at the top of `main`, so a panic on either aborts the whole process. That bounds an interactive import's read hold to the life of the replica without a lease, because there is no way for one runtime to wedge while the other's holds continue. A subprocess test asserts the abort, which cannot be observed from inside the panicking process. `ClusterSpec::cluster_name` lets one process run two clusters of the same kind with distinguishable tracing spans. The interactive runtime takes `compute-interactive`; solo and maintenance keep the bare `compute` so single-runtime logs are unchanged. `enable_compute_interactive_runtime` is replica-scoped but resolved in `environmentd`, because the controller decides `ServiceConfig::ports` before the replica exists and so cannot read the value from the replica's `worker_config`. `CatalogState::replica_scoped_bool` parses the override through the dyncfg rather than `str::parse`, since a stored bool formats as `on`/`off`, which `str::parse::<bool>()` rejects. Off by default in production and in tests. Flipping it changes how a replica is provisioned, so it is not a live toggle: a running replica keeps the layout it was launched with. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
329e8fb to
3fcdd04
Compare
Sixth of eight PRs splitting #37770. Stacks on #38390. Tracked by CPU-216.
With
--interactive-compute-timely-config, clusterd runs two compute runtimes in one process: the first takesMaintenance, the secondInteractive, and both share the one sharing registry so a reader on workeriof either finds the slot a publisher on workeriof the other filled. They must span an equal number of Timely peers, which the config preparation asserts, because the registry pairs workers by ordinal. Without the flag the process runs a singleSoloruntime, unchanged from a deployment with no second runtime.One controller endpoint still fronts the replica: with two runtimes a
Multiplexerserves it, with one the maintenance client builder serves it directly.Shared fate is the read-hold mechanism. Both runtimes' threads are covered by the process-global panic hook installed at the top of
main, so a panic on either aborts the process, bounding an interactive import's read hold to the life of the replica without a lease. A subprocess test asserts the abort, which cannot be observed from inside the panicking process.enable_compute_interactive_runtimeis replica-scoped but resolved inenvironmentd, since the controller decidesServiceConfig::portsbefore the replica exists.replica_scoped_boolparses through the dyncfg rather thanstr::parse, because a stored bool formats ason/off.Off in production and in tests. Flipping it changes how a replica is provisioned, so it is not a live toggle. The interactive runtime cannot serve index peeks until the next PR in the stack, which is safe only because the flag is off here. That is also why the flag is registered in
UNINTERESTING_SYSTEM_PARAMETERSand pinned toFALSEin parallel-workload'sFlipFlagsAction:check-test-flagsrequires a new flag to be registered in the PR that introduces it, but nothing may turn this one on yet. The last PR of the stack promotes it to a variable system parameter defaulting on.