westonpace commented on code in PR #14199:
URL: https://github.com/apache/arrow/pull/14199#discussion_r979038405
##########
cpp/src/arrow/dataset/dataset_writer.cc:
##########
@@ -348,9 +348,9 @@ class DatasetWriterDirectoryQueue {
util::AsyncTaskScheduler::Throttle* throttle_view = throttle.get();
util::AsyncTaskScheduler* file_scheduler = scheduler_->MakeSubScheduler(
FileFinishTask{this, std::move(file_queue), std::move(throttle)},
throttle_view);
- if (init_task_) {
- file_scheduler->AddSimpleTask(init_task_);
- init_task_ = {};
+ if (init_future_.is_valid()) {
Review Comment:
Then, because we don't add the task to wait for any "directory creation
future" the file scheduler is free to start trying to write to the file
immediately.
--
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]