Skip to content

Batch executor with bounded concurrency#25

Open
paulius-krutkis-dcd wants to merge 1 commit into
batch-input-parsingfrom
batch-executor
Open

Batch executor with bounded concurrency#25
paulius-krutkis-dcd wants to merge 1 commit into
batch-input-parsingfrom
batch-executor

Conversation

@paulius-krutkis-dcd

Copy link
Copy Markdown
Collaborator

Part 2 of 4 for the batch-input feature. Builds on batch-input-parsing.

Adds runBatch: pulls items from the streaming input iterator (part 1) and runs them through a worker with a fixed-size concurrency pool.

  • Per-item failures are captured as { class, message } error records and do not abort the batch.
  • Results are emitted via onResult in completion order; returns a { total, succeeded, failed } summary.
  • Iterator pulls and emissions are serialised, so async iterators are never re-entered and onResult is never called concurrently.

Based on batch-input-parsing — review/merge part 1 first.

Stack: 1/4 batch-input-parsing → 2/4 (this) → 3/4 batch-output → 4/4 wire-batch-flags

Add runBatch: pulls items from the streaming input iterator and runs them
through a worker with a fixed-size concurrency pool. Per-item failures are
captured as {class, message} error records and never abort the batch;
results are emitted via onResult in completion order, and a
{total, succeeded, failed} summary is returned.

Iterator pulls and result emissions are each serialised so async iterators
are not re-entered and onResult is never called concurrently.
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