Skip to content

Track timely master: un-shred arrange with multi-capability stamps - #838

Open
frankmcsherry wants to merge 3 commits into
master-nextfrom
stamps
Open

Track timely master: un-shred arrange with multi-capability stamps#838
frankmcsherry wants to merge 3 commits into
master-nextfrom
stamps

Conversation

@frankmcsherry

Copy link
Copy Markdown
Member

Tracks timely master, whose messages are stamped by multisets of timestamps (TimelyDataflow/timely-dataflow#813), and removes the shredding of arranged batches into per-capability tiles.

Three commits:

  1. Track timely master — the dependency switch (the point of master-next) plus mechanical adaptations: Distributor implementations receive the stamp in place of a time and reproduce it on each produced sub-message, and capture events carry a stamp. All stamps remain singletons; behavior is unchanged.
  2. Un-shred arrange — the retire-capabilities-one-at-a-time tile loop (whose comment read "Until timely dataflow supports multiple capabilities on messages, at least") becomes one batcher.seal(frontier) shipped under a CapabilitySet of the retiring capabilities. For totally ordered times the capability antichain has at most one element and behavior is identical. TraceReplayInstruction's capability hint becomes a Stamp (empty exactly for empty batches); trace import replays under delayed_stamp. Consumers accept multi-stamp batches: join lower-bounds each unit's consolidation meet by the lattice meet of the stamp's elements (it must be the meet — any single element would be unsound for the history advance); reduce, count, threshold, and arrange's own input retain each stamp element. An end-to-end test drives two incomparable capabilities through arrange, a live trace import, join, and reduce.
  3. scc_bench — a timed SCC benchmark with all update rounds concurrently open, the workload that distinguishes fused batches from tiles.

Measured on the pre-master-next port of this work (single worker, spreads under 1%): arrange fusion alone is worth 2–5% on scc_bench; fusing reduce's output formation as well reached 2.7–4.8x. That second step is deliberately not in this PR: reduce's output path is now organized around the ReduceTactic contract, whose retire currently promises per-time tiles ("output must be ordered and tile [lower, upper)"), and fusing it properly means revisiting that contract across its implementations — better done as its own PR. Also still singleton-stamped: upsert, the CDC capture path, and dogsdogsdogs' half-joins.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BrUdeCb6dsunVdk4acCPmh

frankmcsherry and others added 3 commits August 18, 2026 21:36
Points the timely dependency at timely master, which stamps each message
with a multiset of timestamps rather than exactly one. The adaptations are
mechanical: Distributor implementations receive the stamp in place of a
time and reproduce it on each produced sub-message, and capture events
carry a stamp. All stamps remain singletons; behavior is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BrUdeCb6dsunVdk4acCPmh
The arrange operator retired capabilities one at a time, carving the batcher
into per-capability tiles because each message could carry only one
capability (its comment: 'Until timely dataflow supports multiple
capabilities on messages, at least'). It now seals one batch per frontier
advance and ships it under a CapabilitySet of the retiring capabilities;
for totally ordered times the capability antichain has at most one element
and behavior is unchanged.

TraceReplayInstruction's capability hint becomes a Stamp (empty exactly for
empty batches), and trace import replays batches under capability sets
minted with delayed_stamp. Consumers accept multi-stamp batches: join
retains the stamp and lower-bounds its unit's consolidation meet by the
lattice meet of the stamp's elements; reduce, count, threshold, and
arrange's own input retain each stamp element.

The test drives two incomparable capabilities through arrange (one batch,
stamped with both times), a concurrent trace import (replaying the same
stamp), and join and reduce over the fused batch (correct outputs).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BrUdeCb6dsunVdk4acCPmh
All rounds are introduced before stepping, so nested iterative scopes hold
many incomparable capabilities: the workload that distinguishes fused
multi-capability batches from per-capability tiles.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BrUdeCb6dsunVdk4acCPmh
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.

1 participant