Sitelet https://github.com/apache/paimon/pull/10369
Skip to content

[flink] Reject a non-positive scan.split-enumerator.batch-size - #10369

Open
jackylee-ch wants to merge 1 commit into
apache:masterfrom
jackylee-ch:flink-split-enumerator-batch-size
Open

jackylee-ch wants to merge 1 commit into
apache:masterfrom
jackylee-ch:flink-split-enumerator-batch-size

Conversation

@jackylee-ch

Copy link
Copy Markdown
Contributor

Purpose

PreAssignSplitAssigner#getNext assigns splits while assignment.size() < splitBatchSize,
so a non-positive scan.split-enumerator.batch-size makes that loop never run: the
enumerator hands out no splits, StaticFileStoreSplitEnumerator reports no-more-splits on
the first request, and a bounded read silently returns zero rows instead of failing.

This validates the batch size is positive in the PreAssignSplitAssigner constructor — the
single point every source builder (FlinkSourceBuilder, SystemTableSource,
CompactorSourceBuilder) funnels through — so the misconfiguration fails fast at job start.
The default is 10, so valid configurations are unaffected.

Tests

PreAssignSplitAssignerTest#testNonPositiveSplitBatchSizeRejected asserts 0 and -1 throw
a clear IllegalArgumentException.

API and Format

No change.

Documentation

No change.

PreAssignSplitAssigner#getNext assigns splits while
assignment.size() < splitBatchSize, so a non-positive
scan.split-enumerator.batch-size makes that loop never run: the
enumerator hands out no splits, StaticFileStoreSplitEnumerator reports
no-more-splits on the first request, and a bounded read silently returns
zero rows instead of failing. Validate the batch size is positive in the
assigner constructor -- the single point every source builder funnels
through -- so the misconfiguration fails fast at job start. The default
is 10, so valid configurations are unaffected.
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