apache/iceberg · warning · RuntimeException
Interrupted while waiting for array pool entry
Error message
Interrupted while waiting for array pool entry
What it means
ArrayPoolDataIteratorBatcher.getCachedEntry polls an object/array pool that blocks until an entry is available; if the waiting thread is interrupted, it re-establishes the interrupt flag and wraps the InterruptedException in a RuntimeException. This normally happens only when the source task is being cancelled or is shutting down.
Source
Thrown at flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/source/reader/ArrayPoolDataIteratorBatcher.java:157
}
@Override
public void wakeUp() {
pool.wakeUp();
}
/**
* Gets a cached entry from the pool, blocking until an entry is recycled or the reader is woken
* up.
*
* @return a cached array from the pool, or {@code null} if woken up
*/
private T[] getCachedEntry() {
try {
return pool.pollEntry();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException("Interrupted while waiting for array pool entry", e);
}
}
}
}
View on GitHub (pinned to 86d9c8fc54)
Solutions
- Usually expected during cancellation — verify the job was intentionally cancelled/restarted; if not, look at what interrupted the reader thread.
- Check for downstream backpressure causing records/batches to never be returned to the pool; inspect backpressure metrics.
- Tune batch/array pool sizing or the reader's fetch batch size so entries are recycled faster.
- If the job repeatedly dies with this during failover, ensure cancellation is given time to finish and the source honors the interrupt cleanly.
Example fix
// before: huge batches starve the pool IcebergSource.builder().fetchBatchSize(100_000)... // after IcebergSource.builder().fetchBatchSize(1_024)... // smaller batches recycle pool entries
Defensive patterns
Strategy: retry
Validate before calling
// check backpressure/pool health before assuming a bug
if (taskMetrics.getBackPressuredTimeMs().getValue() > threshold) {
// reduce fetch batch size or scale parallelism
} Prevention
- Keep fetch batch sizes moderate so pool entries recycle quickly.
- Watch Flink backpressure metrics; scale parallelism before threads stall.
- Expect and tolerate this exception during normal job cancellation.
When it happens
Trigger: The record reader thread calls batch() -> getCachedEntry() and pool.pollEntry() is interrupted while blocked waiting for a pooled array (task cancellation, checkpoint/stop-with-savepoint, job failover).
Common situations: Job cancellation racing with record reading; reader thread starvation where the pool never recycles arrays because downstream stalled; misconfigured pool sizing under high parallelism.
Understand the failure class
Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.
Related errors
- Interrupted while waiting for array pool entry
- Interrupted while waiting for array pool entry
- Interrupted in SQL query
- Interrupted during commit
- Invalid iceberg type %s corresponding to ORC type %s
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/4d2365686ed1b96b.
Report an issue: GitHub.