pvary commented on code in PR #16545:
URL: https://github.com/apache/iceberg/pull/16545#discussion_r3356906557
##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/source/reader/ArrayPoolDataIteratorBatcher.java:
##########
@@ -89,6 +103,14 @@ public RecordsWithSplitIds<RecordAndPosition<T>> next() {
}
T[] batch = getCachedEntry();
+ if (batch == null) {
+ // We were woken up (e.g. during shutdown) while waiting for a pool
entry. Return an empty
+ // batch so that fetch() returns control and stays reentrant: the
fetcher loop will either
+ // exit (shutdown) or call fetch() again, blocking here once more if
the pool is still
+ // exhausted (e.g. while waiting for watermark alignment).
Review Comment:
```suggestion
// We were woken up (e.g. during shutdown) while waiting for a pool
entry. Return an empty
// batch so that fetch() returns control and stays reentrant.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]