This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new fb977587112 [fix](outfile)Fixed orcOutputStream.close() throwing an
exception during destruction causing the program to hang. (#34255)
fb977587112 is described below
commit fb9775871120e2d9ec0f732f147c5845a0034385
Author: daidai <[email protected]>
AuthorDate: Mon Apr 29 14:42:54 2024 +0800
[fix](outfile)Fixed orcOutputStream.close() throwing an exception during
destruction causing the program to hang. (#34255)
master #34243
---
be/src/vec/runtime/vorc_writer.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/be/src/vec/runtime/vorc_writer.cpp
b/be/src/vec/runtime/vorc_writer.cpp
index b9107251970..c719268c9b8 100644
--- a/be/src/vec/runtime/vorc_writer.cpp
+++ b/be/src/vec/runtime/vorc_writer.cpp
@@ -54,7 +54,16 @@ VOrcOutputStream::VOrcOutputStream(doris::io::FileWriter*
file_writer)
VOrcOutputStream::~VOrcOutputStream() {
if (!_is_closed) {
- close();
+ try {
+ close();
+ } catch (...) {
+ /*
+ * Under normal circumstances, close() will be called first, and then
the destructor will be called.
+ * If the task is canceled, close() will not be executed, but the
destructor will be called directly,
+ * which will cause the be core.When the task is canceled, since the
log file has been written during
+ * close(), no operation is performed here.
+ */
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]