Skip to content

Separate chunker from batcher #625

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

antiguru
Copy link
Member

The chunker was part of the batcher and responsible for transforming input data into the batcher's chain format. Hence, the batcher needed to be aware of its input types, although it would not otherwise use this information.

With this change, the chunker is separate of the batcher. This simplifies the logic within the chunker slightly, but most importantly moves the responsibility to form chunks to whoever holds the batcher. In Differential, this is arrange_core. It now learns about an input container type and a chunker and uses the chunker to convert input data to chunks of sorted and consolidated data.

The chunker was part of the batcher and responsible for transforming input
data into the batcher's chain format. Hence, the batcher needed to be aware
of its input types, although it would not otherwise use this information.

With this change, the chunker is separate of the batcher. This simplifies
the logic within the chunker slightly, but most importantly moves the
responsibility to form chunks to whoever holds the batcher. In
Differential, this is `arrange_core`. It now learns about an input
container type and a chunker and uses the chunker to convert input data
to chunks of sorted and consolidated data.

Signed-off-by: Moritz Hoffmann <antiguru@gmail.com>
@antiguru antiguru requested a review from frankmcsherry July 15, 2025 12:39
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