Repository navigation
Conversation
0b83619 to
e4df1e7
Compare
e4df1e7 to
db592b9
Compare
db592b9 to
acaae62
Compare
e0c1fed to
7eeb13c
Compare
7eeb13c to
5c1ad88
Compare
5c1ad88 to
882fe25
Compare
1b830fc to
086d395
Compare
086d395 to
9687c2c
Compare
9687c2c to
16675c9
Compare
16675c9 to
ccffa13
Compare
QA LLM Review1. HIGH --
|
ccffa13 to
0225ab1
Compare
623d6e8 to
14ea39e
Compare
14ea39e to
570e6fc
Compare
c1c2e9b to
62f35ed
Compare
d3ad174 to
63dfc7f
Compare
63dfc7f to
7e8bc9f
Compare
8bc0669 to
b3caa57
Compare
b3caa57 to
6f7a587
Compare
6f7a587 to
8cf4047
Compare
45bec4c to
9202934
Compare
The registry holds one slot per index id, and the slot records the `as_of` of the dataflow that exports the index. A lookup returns the slot when its `as_of` matches and it is not frozen, and creates a fresh one otherwise, so two incarnations of one id wanted at once evict each other. That is safe only once the two runtimes cannot want two incarnations at once, which the reconcile barrier between their reconciliations ensures. Once the traces that published into a slot closed or dropped, the slot is frozen, and the registry creates a fresh slot for the next incarnation instead of returning the frozen one, whose points refuse a second trace. Readers of the frozen slot keep its final view. A re-export's points are backed by another index's trace and do not freeze when the re-exporting index drops, so a recreated re-export gets a fresh slot only because reconciliation dropped every holder of the old one first. Co-Authored-By: Claude Opus 5.5 <[email protected]>
4 of 14 in the interactive-runtime stack. Stacks on #38386, followed by #38388. Tracked by CPU-215. The design document is
doc/developer/design/20261107_interactive_runtime.mdin #40559.A reader on another thread needs a way to find a published arrangement. This adds
ArrangementSharingRegistry, one per local worker ordinal, shared by workeriof one runtime and workeriof the other. Pairing by local ordinal is sound only because both runtimes run the same workers per process at the same process ordinal, so both shard keys bykey.hashed() % peers.GlobalId, and the slot records theas_ofof the dataflow that exports the index.get_or_createreturns the slot when itsas_ofmatches and it is not frozen, and otherwise creates a fresh slot and replaces the map entry. So an index recreated below the old incarnation'ssincenever reads the old, compacted chain. Two incarnations of one id wanted at once evict each other's entry, which is safe only under the reconcile barrier compute: a reconcile barrier between the two compute runtimes #40558 adds.PublishTokenor a reader holds it, so dropping a publication needs no removal call.publishis the one entry point for a publisher. It panics if the slot it adopts is live, not frozen, and already backed, and soft-panics if the same trace backs it. A NOTE records why a re-export's slot, which does not freeze when the re-exporting index drops, is gone by the time reconciliation recreates it.attach_publisherandattach_readerpanic on a second thread of either kind.publishandnotifydo not check their caller.Inert: nothing constructs a registry outside tests.
Tests in
sharing/tests.rscover slot convergence and lifetime, frozen-slot replacement, the thread pairing, cross-thread reads and joins, and re-exports:a_recreated_reexport_publishes_into_a_fresh_slot_once_its_holders_dropped, anda_held_reexport_slot_is_not_replaced, which pins the limit.A reviewer should check the key choice against the design document's argument, and the re-export NOTE on
publish.Posted by Claude Code.
🤖 Generated with Claude Code