danielcweeks commented on code in PR #7844: URL: https://github.com/apache/iceberg/pull/7844#discussion_r1428383394
########## core/src/main/java/org/apache/iceberg/util/ParallelIterable.java: ########## @@ -67,10 +70,17 @@ private ParallelIterator( try (Closeable ignored = (iterable instanceof Closeable) ? (Closeable) iterable : () -> {}) { for (T item : iterable) { - queue.add(item); + if (closed) { + queue.clear(); + return; + } + queue.put(item); } } catch (IOException e) { throw new RuntimeIOException(e, "Failed to close iterable"); + } catch (InterruptedException e) { + throw new RuntimeException( Review Comment: Do we actually want to throw here or just log? It seems like you'll have to deal with an unnecessary/non-actionable exception when you're really just trying to cancel the iteration. Maybe just turn this into an info log message? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org