pitrou commented on issue #40068:
URL: https://github.com/apache/arrow/issues/40068#issuecomment-1944240567
Thanks! So, trying to sum it up:
* main thread has an Acero source node whose `StartProducing` calls
`FragmentsToBatches` calls `ParquetFileFormat::ScanBatchesAsync`
```
#2
arrow::dataset::ParquetFileFormat::ScanBatchesAsync(std::shared_ptr<arrow::dataset::ScanOptions>
const&, std::shared_ptr<arrow::dataset::FileFragment> const&) const
$ARROW_ROOT/cpp/src/arrow/dataset/file_parquet.cc:607:36
(arrow_reproduce+0x126e20b)
#3
arrow::dataset::FileFragment::ScanBatchesAsync(std::shared_ptr<arrow::dataset::ScanOptions>
const&) $ARROW_ROOT/cpp/src/arrow/dataset/file_base.cc:188:19
(arrow_reproduce+0x1156715)
#4 arrow::dataset::(anonymous
namespace)::FragmentToBatches(arrow::Enumerated<std::shared_ptr<arrow::dataset::Fragment>>
const&, std::shared_ptr<arrow::dataset::ScanOptions> const&)
$ARROW_ROOT/cpp/src/arrow/dataset/scanner.cc:305:3 (arrow_reproduce+0x11c4fa1)
#5 arrow::dataset::(anonymous
namespace)::FragmentsToBatches(std::function<arrow::Future<std::shared_ptr<arrow::dataset::Fragment>>
()>, std::shared_ptr<arrow::dataset::ScanOptions>
const&)::$_0::operator()(arrow::Enumerated<std::shared_ptr<arrow::dataset::Fragment>>
const&) const $ARROW_ROOT/cpp/src/arrow/dataset/scanner.cc:333:36
(arrow_reproduce+0x11c4fa1)
```
* Arrow worker thread executes a Future callback from
`ParquetFileReader::OpenAsync`'s own callback, that in turn calls
`ParquetFileFormat::ScanBatchesAsync`
```
#4
arrow::dataset::ParquetFileFragment::SetMetadata(std::shared_ptr<parquet::FileMetaData>,
std::shared_ptr<parquet::arrow::SchemaManifest>)
$ARROW_ROOT/cpp/src/arrow/dataset/file_parquet.cc:819:13
(arrow_reproduce+0x12764c2)
#5
arrow::dataset::ParquetFileFragment::EnsureCompleteMetadata(parquet::arrow::FileReader*)
$ARROW_ROOT/cpp/src/arrow/dataset/file_parquet.cc:811:10
(arrow_reproduce+0x1275b25)
#6
arrow::dataset::ParquetFileFormat::ScanBatchesAsync(std::shared_ptr<arrow::dataset::ScanOptions>
const&, std::shared_ptr<arrow::dataset::FileFragment> const&)
const::$_0::operator()(std::shared_ptr<parquet::arrow::FileReader> const&)
$ARROW_ROOT/cpp/src/arrow/dataset/file_parquet.cc:618:5
(arrow_reproduce+0x1283f68)
```
What seems weird is that two `ScanBatchesAsync` calls would happen on the
_same_ fragment.
--
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]