From 596ebc9cb4195ff749cc1a0b9f591e8070eb509c Mon Sep 17 00:00:00 2001 From: Thomas Newton Date: Fri, 29 Nov 2024 00:49:02 +0000 Subject: [PATCH] Adjust comment --- cpp/src/arrow/filesystem/filesystem.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/arrow/filesystem/filesystem.cc b/cpp/src/arrow/filesystem/filesystem.cc index 533e228c02272..4245081391c53 100644 --- a/cpp/src/arrow/filesystem/filesystem.cc +++ b/cpp/src/arrow/filesystem/filesystem.cc @@ -653,8 +653,8 @@ Status CopyFiles(const std::vector& sources, // Spawn copy_one_file less urgently than default, so that background_writes are done // with higher priority. Otherwise copy_one_file will keep buffering more data in memory - // and there will be no IO threads left to do the background_writes. Large copies - // where the background_writes are delayed too much, will cause OOMs. + // without giving the background_writes any chance to upload the data and drop it from + // memory. Therefore, without this large copies would cause OOMs. TaskHints hints{10}; auto future = ::arrow::internal::OptionalParallelForAsync( use_threads, sources, std::move(copy_one_file), hints, io_context.executor());