Skip to content

int_proxy: VecReduceBackend records seeds as it draws novel records - #1016

Merged
frankmcsherry merged 1 commit into
TimelyDataflow:master-nextfrom
frankmcsherry:vec-backend-seeds-at-draw
Oct 24, 2026
Merged

frankmcsherry merged 1 commit into
TimelyDataflow:master-nextfrom
frankmcsherry:vec-backend-seeds-at-draw

Conversation

@frankmcsherry

Copy link
Copy Markdown
Member

Fixes #994.

VecReduceBackend drew a key's novel and prior records into one list and consolidated it. A novel flag in the sort key kept consolidation from netting a novel record against its history before the record's time was taken as a seed; the records were then netted by hand. The flag also sorted each value's prior records before its novel ones. With partially ordered times, advancing a prior record to lower can move it past a novel one: (0, 5) advances to (1, 5), after a novel (1, 0). The input bridge was then unsorted and unconsolidated, which fails debug_assert_sorted_bridge. Release builds gave correct output, because the tactic re-consolidates each value's edits.

The walk now records the seeds as it draws the novel records, before anything is consolidated, as the ReduceWindow docs ask. The flag and the netting by hand are gone: one consolidation by (data, time) leaves each key's input sorted and netted. vec_backend.rs is +33/−41.

The regression test, reduce_prior_advanced_past_novel, is from #995.

Checks

  • cargo test -p differential-dataflow: 149 passed.
  • A scratch harness (not committed) compared this reduce against the cursor reduce on 1,600 random inputs at Product<u64, u64> times, in a debug build. On master-next, 1,339 of them fail the assertion; with this change, none do and all match.
  • int_proxy_bench: no change beyond run-to-run noise.

🤖 Generated with Claude Code

https://claude.ai/code/session_019XsakwFGwtESwZ1gSYwG4o

Fixes TimelyDataflow#994.

`VecReduceBackend` drew a key's novel and prior records into one list and
consolidated it. A `novel` flag in the sort key kept consolidation from netting
a novel record against its history before the record's time was taken as a
seed; the records were then netted by hand. The flag also sorted each value's
prior records before its novel ones. With partially ordered times, advancing a
prior record to `lower` can move it past a novel one: `(0, 5)` advances to
`(1, 5)`, after a novel `(1, 0)`. The input bridge was then unsorted and
unconsolidated, which fails `debug_assert_sorted_bridge`. Release builds gave
correct output, because the tactic re-consolidates each value's edits.

The walk now records the seeds as it draws the novel records, before anything
is consolidated, as the `ReduceWindow` docs ask. The flag and the netting by
hand are gone: one consolidation by `(data, time)` leaves each key's input
sorted and netted.

The regression test is Bryan O'Sullivan's, from TimelyDataflow#995.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019XsakwFGwtESwZ1gSYwG4o
@frankmcsherry
frankmcsherry merged commit 96b70f4 into TimelyDataflow:master-next Oct 24, 2026
7 checks passed
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