Repository navigation
GH-15233: [C++] Fix CopyFiles when destination is a FileSystem with background_writes - #44897
Conversation
pitrou
left a comment
There was a problem hiding this comment.
This looks good on the principle.
By the way, this seems based on a rather old version of git main, can you update?
1294e38 to
dbefb7e
Compare
pitrou
left a comment
There was a problem hiding this comment.
Thanks for the update! Here are some more comments.
|
@github-actions crossbow submit -g cpp |
This comment was marked as outdated.
This comment was marked as outdated.
|
Hmm, it looks like we'll either have to fix the serial executor to also take priorities into account (if that's at all possible?), or simply disable the priority test when threading is disabled. |
I think we can implement priorities exactly the same on |
I think it would at least require making the constructor of |
Co-authored-by: Antoine Pitrou <[email protected]>
697c747 to
7573d11
Compare
|
@pitrou do you have any opinion on extra tests for priorities in |
93c00e9 to
7573d11
Compare
|
@github-actions crossbow submit -g cpp |
This comment was marked as outdated.
This comment was marked as outdated.
|
Sorry, it looks like there are some bits that I missed when converting |
|
Ok, this time I managed to test it locally |
|
@github-actions crossbow submit -g cpp |
|
Revision: 5774bf2 Submitted crossbow builds: ursacomputing/crossbow @ actions-372e4c30db |
|
Thanks for triggering the extra tests again. That run is looking better but it looks like a couple failed because of a timeout downloading a dependency Presumably this is not related to me changes. |
|
Yes, I've restarted those CI builds. |
|
Ok, thanks a lot for doing this @Tom-Newton ! |
Thanks for reviewing |
|
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 894f5fb. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 8 possible false positives for unstable benchmarks that are known to sometimes produce them. |
Rationale for this change
Currently it deadlocks when trying to upload more files than we have IO threads.
What changes are included in this PR?
copy_one_fileless urgently than default, so thatbackground_writesare done with higher priority. Otherwisecopy_one_filewill keep buffering more data in memory without giving thebackground_writesany chance to upload the data and drop it from memory. Therefore, without this large copies would cause OOMs.std::priority_queueto implement the priority.arrow-acero-hash-aggregate-testthat fail if this property is not maintained. I'm not sure what is the correct option but for now I have ensured that tasks of the same priority are run in the order they are spawned.Are these changes tested?
Added some extra automated tests. I also ran some large scale tests copying between Azure and local with a directory of about 50,000 files of varying sizes totalling 160GiB.
Are there any user-facing changes?
CopyFilesshould now work reliablyThreadPoolnow runs tasks in priority order