This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new d8dd0536e0 [enhance](S3FileWriter) sync when s3 file writer early
quits #19393
d8dd0536e0 is described below
commit d8dd0536e0c909fbb287d93dc57e3cad98c7ae26
Author: AlexYue <[email protected]>
AuthorDate: Tue May 9 11:02:58 2023 +0800
[enhance](S3FileWriter) sync when s3 file writer early quits #19393
---
be/src/io/fs/s3_file_writer.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/be/src/io/fs/s3_file_writer.cpp b/be/src/io/fs/s3_file_writer.cpp
index 5e1313b9c6..dc6f84fa1c 100644
--- a/be/src/io/fs/s3_file_writer.cpp
+++ b/be/src/io/fs/s3_file_writer.cpp
@@ -83,6 +83,8 @@ S3FileWriter::~S3FileWriter() {
close();
}
CHECK(!_opened || _closed) << "open: " << _opened << ", closed: " <<
_closed;
+ // in case there are task which might run after this object is destroyed
+ _wait_until_finish("dtor");
}
Status S3FileWriter::_create_multi_upload_request() {
@@ -263,6 +265,7 @@ void S3FileWriter::_upload_one_part(int64_t part_num,
S3FileBuffer& buf) {
Status S3FileWriter::_complete() {
SCOPED_RAW_TIMER(_upload_cost_ms.get());
if (_failed) {
+ _wait_until_finish("early quit");
return _st;
}
// upload id is empty means there was no multipart upload
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]