[fix](outfile)Fixed orcOutputStream.close() throwing an exception during destruction causing the program to hang. (#34254)

bp #34243
This commit is contained in:
daidai
2024-04-28 19:54:34 +08:00
committed by GitHub
parent 417431fd83
commit 946d28646a

View File

@ -62,7 +62,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.
*/
}
}
}