Skip to content

Commit fda6a81

Browse files
antiguruclaude
andcommitted
compute: a shared-trace primitive for cross-thread arrangement reads
An arrangement is normally readable only from the timely worker that maintains it, because its batches are `Rc`-backed and its trace handle is neither `Send` nor `Sync`. This adds a publication point that carries `Arc`-backed batches together with the trace's `since` and `upper`, so a reader on any thread can mint a `Send` handle for the same arrangement and import it as a snapshot at a chosen `as_of`. Nothing in the crate calls it yet, so the module is inert: it compiles, its unit tests exercise publish, import, seal, and compaction holdback, and no rendered dataflow reaches it. The concrete `SharedOks*`/`SharedErrs*` type aliases live here rather than alongside the registry that will consume them. They name a shared-trace handle over `RowRowSpine` and `ErrSpine` and mention no registry type, so this is where they belong. `Published::diagnostics`, `note_writer_logical`, and `note_standing_hold` are `pub` like the rest of the type's accessors. Scoping them to the crate would make them unreachable for dead-code analysis while the only callers are the tests. Tests are out of line in `shared_trace/tests.rs`, per the convention in `src/compute/AGENTS.md`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 87c4c30 commit fda6a81

3 files changed

Lines changed: 2499 additions & 0 deletions

File tree

src/compute/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ mod extensions;
2121
mod logging;
2222
mod metrics;
2323
mod render;
24+
pub mod shared_trace;
2425
/// MV sink machinery, exposed for benchmarks.
2526
#[cfg(feature = "bench")]
2627
pub mod sink;

0 commit comments

Comments
 (0)