Skip to content

Conversation

findepi
Copy link
Member

@findepi findepi commented Jun 13, 2023

IcebergSplitSource could fail with Split source must be finished before TableExecuteSplitsInfo is read in the following scenario

  • getNextBatch called, initializing fileScanIterator and fileTasksIterator, but not consuming them fully
  • dynamic filters completes
  • getNextBatch called, crossing dynamic filter with table predicate, concluding it's none, calling finish() and returning NO_MORE_SPLITS_BATCH (signalling the source is finished)
  • getTableExecuteSplitsInfo is called by SourcePartitionedScheduler. The invocation fails because isFinished returns false, as fileTasksIterator isn't consumed.

`IcebergSplitSource` could fail with `Split source must be finished
before TableExecuteSplitsInfo is read` in the following scenario

- `getNextBatch` called, initializing `fileScanIterator` and
  `fileTasksIterator`, but not consuming them fully
- dynamic filters completes
- `getNextBatch` called, crossing dynamic filter with table predicate,
  concluding it's none, calling `finish()` and returning
  NO_MORE_SPLITS_BATCH (signalling the source is finished)
- `getTableExecuteSplitsInfo` is called by `SourcePartitionedScheduler`.
  The invocation fails because `isFinished` returns false, as
  `fileTasksIterator` isn't consumed.
@cla-bot cla-bot bot added the cla-signed label Jun 13, 2023
@github-actions github-actions bot added the iceberg Iceberg connector label Jun 13, 2023
@findepi findepi merged commit 2ec1712 into trinodb:master Jun 13, 2023
@findepi findepi deleted the findepi/fix-iceberg-scheduling-failure-due-to-dynamic-filters-c19c30 branch June 13, 2023 11:48
@github-actions github-actions bot added this to the 420 milestone Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed iceberg Iceberg connector
Development

Successfully merging this pull request may close these issues.

3 participants