Skip to content

DDIR: gather trace merge timestamps by lane - #1117

Draft
frankmcsherry wants to merge 2 commits into
TimelyDataflow:master-nextfrom
frankmcsherry:ddir-merge-timestamp-lanes
Draft

frankmcsherry wants to merge 2 commits into
TimelyDataflow:master-nextfrom
frankmcsherry:ddir-merge-timestamp-lanes

Conversation

@frankmcsherry

@frankmcsherry frankmcsherry commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

DDIR trace merge builds source tags and row offsets to gather the surviving keys and values.
Reuse that map to gather timestamps one coordinate at a time.
Exclusive runs still extend the map and diffs in bulk, and equal times still combine their diffs in the merge loop.
A coordinate missing from a source reads as zero.

In the maintained transaction experiment, 82% of range appends copied a single row.
At 100,000 transactions per cycle, consolidation fell from 3.63 s to 2.81 s and all merge phases from 8.40 s to 7.74 s, summed across workers.
Whole-cycle latency showed no consistent change.
Those numbers are from the earlier prototype, with the same Popster survey in both arms.
This PR uses DDIR's existing Corgi survey.

All 190 interactive library tests pass, including a timestamp gather test with unequal input widths.
The release server passed the maintained transaction workload's serial rollback and final-state checks at 10,000 and 100,000 transactions per cycle.
The performance follow-up is a comparison against the parent commit with Corgi throughout, plus a merge-heavy workload with longer contiguous runs.

cargo build --release -p ddir-server
python3 interactive/bench/txn/bench_txn.py \
  --modes maintained --shape blog --workers 4 --batch-sizes 100000 \
  --keys 10000 --rounds 5 --warmup 2

frankmcsherry and others added 2 commits November 27, 2026 21:19
The lane gather wins on single-row runs but loses to slice copies once runs reach about eight rows.
Merge now records its output as stretches: a run of at least eight rows is a slice copy per lane, and shorter runs join a stretch read row by row through the tags and offsets.
Each lane is one pass over the stretches.

On LDBC SF1, all 41 plans in one server with 4 workers, answers match master-next at every capture.
The initial settle falls from 44.8 s to 38.7 s, the same as the plain gather (38.1 s).
The 521-epoch replay is unchanged, within the 5% noise between repeats.
In that workload 62% of merge rows come from runs shorter than eight, and longer runs average 17 rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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