OliLay commented on code in PR #43096:
URL: https://github.com/apache/arrow/pull/43096#discussion_r1714996672
##########
cpp/src/arrow/filesystem/azurefs.cc:
##########
@@ -1066,20 +1111,95 @@ class ObjectAppendStream final : public
io::OutputStream {
// flush. This also avoids some unhandled errors when flushing in the
destructor.
return Status::OK();
}
- return CommitBlockList(block_blob_client_, block_ids_,
commit_block_list_options_);
+
+ auto fut = FlushAsync();
+ RETURN_NOT_OK(fut.status());
+
+ std::unique_lock<std::mutex> lock(upload_state_->mutex);
+ return CommitBlockList(block_blob_client_, upload_state_->block_ids,
Review Comment:
Good point. I think because in the linked test we make sure the destructor
is called which will also trigger a commit.
I wrote an more explicit test which only triggers `CloseAsync()` and makes
sure data is written correctly: 48bc6bed5398f062e2f6f04b64873da7186f5f0c
--
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]