Skip to content

Revert the extract-first seal; restore merge-then-extract#796

Merged
frankmcsherry merged 1 commit into
TimelyDataflow:master-nextfrom
frankmcsherry:revert/extract-first-seal
Jul 13, 2026
Merged

Revert the extract-first seal; restore merge-then-extract#796
frankmcsherry merged 1 commit into
TimelyDataflow:master-nextfrom
frankmcsherry:revert/extract-first-seal

Conversation

@frankmcsherry

Copy link
Copy Markdown
Member

The extract-first seal (#793) folded the returned frontier during the per-chain
extract, before cross-chain consolidation. Two ladder chains that never merged
can carry cancelling updates at the same kept time (an insert and a retract of
one record at a future/delayed time, arriving in different batches); their diffs
net to zero, so that time needs no capability — but per-chain extract inserts it
into the frontier from each chain, and the batcher then holds a capability it
can never discharge (the chains may sit un-merged indefinitely under the
geometric ladder), stalling progress. It affects every MergeBatcher, including
the mainline VecMerger-backed OrdVal/OrdKey batchers.

This restores merge-then-extract: all chains merge into one (consolidating equal
(data, time), dropping zeros) before extract folds the frontier, so the frontier
reflects the post-consolidation set of distinct kept times. Cost is ~14% on the
SCC benchmark — exactly the seal-side win #793 had claimed.

Adds merge_batcher unit tests (frontier_is_post_consolidation) guarding the
property, so a future seal that revisits the extract-first idea can't silently
reintroduce the bug.

The extract-first seal (TimelyDataflow#793) folded the returned frontier during the per-chain
extract, before cross-chain consolidation, so a kept time whose updates cancel
across two un-merged chains was wrongly reported — the batcher held a capability
that never discharges, stalling progress. Restore the merge-then-extract seal:
all chains merge into one (consolidating equal (data,time), dropping zeros)
before extract folds the frontier, so the frontier reflects post-consolidation
distinct times.

Keeps regression tests (frontier_is_post_consolidation) so the property is
guarded if a future seal revisits the extract-first idea.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@frankmcsherry frankmcsherry merged commit 0f41c0b into TimelyDataflow:master-next Jul 13, 2026
6 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 15, 2026
frankmcsherry added a commit that referenced this pull request Jul 15, 2026
Rewrite the release-plz-generated changelogs into the house style:
categorized Added/Changed/Removed sections plus a closing summary of
the breaking surface. Add the omitted timely 0.31 bump, drop the
reverted extract-first seal pair (#793/#796), de-duplicate the HRTB
entries, and flag the new Chunk and JoinTactic/ReduceTactic surface as
experimental.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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