swanandx commented on code in PR #3277:
URL: https://github.com/apache/iceberg-rust/pull/3277#discussion_r4314277467
##########
crates/iceberg/src/arrow/reader/pipeline.rs:
##########
@@ -91,9 +91,21 @@ impl ArrowReader {
.try_flatten(),
)
} else {
+ let runtime = self.runtime.clone();
Box::pin(
tasks
- .map_ok(move |task| task_reader.clone().process(task))
+ .map_ok(move |task| {
+ // Open the file on the IO runtime: the flatten below
stops polling
+ // the opens once it holds
`concurrency_limit_data_files` streams, and
+ // a half-read response keeps part of the HTTP/2
connection window,
+ // which stalls every other read on that connection.
Abort on drop,
+ // so a dropped scan stops its opens rather than fetch
for nobody.
+ let opening = runtime
+ .io()
+ .spawn(task_reader.clone().process(task))
+ .abort_on_drop();
+ async move { opening.await? }
Review Comment:
Let me see if spawning just `open_parquet_file` inside `process()` works,
and report back. thanks for the review, really appreciate it!
--
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]