{"record":{"id":"9fbded614e0872e9","repo":"apache/iceberg","slug":"failed-to-process-task-iterable","errorCode":null,"errorMessage":"Failed to process task iterable: ","messagePattern":"Failed to process task iterable: ","errorType":"exception","errorClass":"UncheckedIOException","httpStatus":null,"severity":"error","filePath":"flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/source/FlinkSplitPlanner.java","lineNumber":80,"sourceCode":"                  hostnames = Util.blockLocations(table.io(), task);\n                }\n                splits[index] = new FlinkInputSplit(index, task, hostnames);\n              });\n      return splits;\n    } catch (IOException e) {\n      throw new UncheckedIOException(\"Failed to process tasks iterable\", e);\n    }\n  }\n\n  /** This returns splits for the FLIP-27 source */\n  public static List<IcebergSourceSplit> planIcebergSourceSplits(\n      Table table, ScanContext context, ExecutorService workerPool) {\n    try (CloseableIterable<CombinedScanTask> tasksIterable =\n        planTasks(table, context, workerPool)) {\n      return Lists.newArrayList(\n          CloseableIterable.transform(tasksIterable, IcebergSourceSplit::fromCombinedScanTask));\n    } catch (IOException e) {\n      throw new UncheckedIOException(\"Failed to process task iterable: \", e);\n    }\n  }\n\n  static CloseableIterable<CombinedScanTask> planTasks(\n      Table table, ScanContext context, ExecutorService workerPool) {\n    ScanMode scanMode = checkScanMode(context);\n    if (scanMode == ScanMode.INCREMENTAL_APPEND_SCAN) {\n      IncrementalAppendScan scan = table.newIncrementalAppendScan();\n      scan = refineScanWithBaseConfigs(scan, context, workerPool);\n\n      if (context.startTag() != null) {\n        Preconditions.checkArgument(\n            table.snapshot(context.startTag()) != null,\n            \"Cannot find snapshot with tag %s\",\n            context.startTag());\n        scan = scan.fromSnapshotExclusive(table.snapshot(context.startTag()).snapshotId());\n      }\n","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v1.20/flink/src/main/java/org/apache/iceberg/flink/source/FlinkSplitPlanner.java#L62-L98","documentation":"FlinkSplitPlanner.planIcebergSourceSplits converts the CloseableIterable of CombinedScanTasks into IcebergSourceSplits for the FLIP-27 source; IOException while consuming/closing the tasks iterable is wrapped in UncheckedIOException. It signals failure reading table metadata/manifests during scan planning.","triggerScenarios":"Iterating planTasks results when FileIO fails to read manifests/metadata, snapshots expired concurrently, or storage is unreachable while closing the CloseableIterable.","commonSituations":"S3 credentials misconfiguration, HDFS outage during job startup, snapshot expiry racing with an IcebergSource job's initial planning, network partitions to object storage.","solutions":["Inspect the wrapped IOException cause for the actual storage error","Verify FileIO credentials and network access to the table location","Pin a snapshot-id to avoid expiry races, or pause expiring/compacting jobs during planning","Retry source startup; reduce workerPool threads if the storage is throttling"],"exampleFix":"// before\nList<IcebergSourceSplit> splits = FlinkSplitPlanner.planIcebergSourceSplits(table, context, pool);\n// after: refresh and retry on transient IO failure\ntable.refresh();\nList<IcebergSourceSplit> splits;\ntry {\n  splits = FlinkSplitPlanner.planIcebergSourceSplits(table, context, pool);\n} catch (UncheckedIOException e) {\n  splits = FlinkSplitPlanner.planIcebergSourceSplits(table, context, pool); // retry once\n}","handlingStrategy":"retry","validationCode":"table.refresh();\nScanContext ctx = context.copyWithSnapshotId(table.currentSnapshot().snapshotId());","typeGuard":null,"tryCatchPattern":"try {\n  return FlinkSplitPlanner.planIcebergSourceSplits(table, context, workerPool);\n} catch (UncheckedIOException e) {\n  LOG.warn(\"Split planning IO failure, retrying\", e);\n  return FlinkSplitPlanner.planIcebergSourceSplits(table, context, workerPool);\n}","preventionTips":["Pin snapshot-id to prevent expiry during planning","Verify FileIO access before starting IcebergSource jobs","Keep storage clients healthy (avoid connection-pool exhaustion)"],"tags":["flink","split-planning","io","flip-27"],"backgroundTag":"file-read-failed","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}