Commits


Weston Pace authored and Antoine Pitrou committed 5a51c6d2f83
ARROW-15438: [Python] Flaky test test_write_dataset_max_open_files The test could fail when writing due to a race condition. If the batches were delivered `AAAAABBBBBCCCCC...` then by the time we need to close a file to make space we can close an already completed file (and so we won't have to open up a new one later) and we end up with 5 files for 5 partitions. Adding `use_threads=False` to the `write_dataset` call was not sufficient. The `arrow::dataset::FileSystemDataset::Write` method was always using the CPU executor for the exec plan. In other scanner methods we base the CPU executor on the scan options (`nullptr` if `scan_options->use_threads` is `false`). Making both of these changes together seems to make the test reliably pass. Closes #12263 from westonpace/bugfix/ARROW-15438--allow-single-threaded-writes Authored-by: Weston Pace <weston.pace@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>