This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 9714a3c8739e229a6d11ff93ef326f7fe2688636 Author: Xin Liao <[email protected]> AuthorDate: Thu Jan 18 08:12:01 2024 +0800 [fix](regression) fault injection may cause fd to be closed twice (#30070) --- be/src/io/fs/local_file_writer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be/src/io/fs/local_file_writer.cpp b/be/src/io/fs/local_file_writer.cpp index 4c35101584c..78ea87cf3f2 100644 --- a/be/src/io/fs/local_file_writer.cpp +++ b/be/src/io/fs/local_file_writer.cpp @@ -200,6 +200,7 @@ Status LocalFileWriter::_close(bool sync) { if (0 != ::close(_fd)) { return localfs_error(errno, fmt::format("failed to close {}", _path.native())); } + _closed = true; DBUG_EXECUTE_IF("LocalFileWriter.close.failed", { // spare '.testfile' to make bad disk checker happy @@ -208,7 +209,6 @@ Status LocalFileWriter::_close(bool sync) { } }); - _closed = true; return Status::OK(); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
