You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C++][Parquet] ParquetFileReader::Close() doesn't release pre-buffered data #55715
ParquetFileReader::Close() doesn't release pre-buffered data. Pre-buffering is enabled by default.
If we use MemoryMappedFile, the pre-buffered data refers to the mapped memory. So the file is still mapped after we close the reader and the source. The file is unmapped only when the reader is destroyed.
This is a problem on Windows because we can't remove a mapped file. For example, this fails on Windows:
Open a file with MemoryMappedFile
Read data with the default ArrowReaderProperties
Close the reader and the source
Remove the file
ARROW_ASSIGN_OR_RAISE(
auto source,
arrow::io::MemoryMappedFile::Open(path, arrow::io::FileMode::READ));
ARROW_ASSIGN_OR_RAISE(auto reader,
parquet::arrow::OpenFile(source, arrow::default_memory_pool()));
std::shared_ptr<arrow::Table> table;
ARROW_RETURN_NOT_OK(reader->ReadTable(&table));
table.reset();
reader->parquet_reader()->Close();
ARROW_RETURN_NOT_OK(source->Close());
// The file is still mapped here.
Activity
GH-55715: [C++][Parquet] Release pre-buffered data in ParquetFileRead…
kou commentedon Nov 22, 2026
Issue resolved by pull request 55716
#55716