This is an automated email from the ASF dual-hosted git repository. kxiao pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
commit bca7a5b3c336a2cfa533ebdd0324ea96ce2c6d5c Author: airborne12 <airborn...@gmail.com> AuthorDate: Thu Jun 29 19:47:55 2023 +0800 [Fix](inverted index) fix a bundle of inverted index exception process errors (#21328) 1. fix alloc/free mismatch problem. 2. fix buffer use after free problem. --- be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp | 4 ++-- be/src/olap/rowset/segment_v2/inverted_index_writer.cpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp b/be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp index 83660cca66..4574d64abf 100644 --- a/be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp +++ b/be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp @@ -484,12 +484,12 @@ void DorisCompoundDirectory::init(const io::FileSystemSPtr& _fs, const char* _pa if (!status.ok()) { auto err = "File system error: " + status.to_string(); LOG(WARNING) << err; - _CLTHROWA_DEL(CL_ERR_IO, err.c_str()); + _CLTHROWA(CL_ERR_IO, err.c_str()); } if (!exists) { auto e = "Doris compound directory init error: " + directory + " is not a directory"; LOG(WARNING) << e; - _CLTHROWA_DEL(CL_ERR_IO, e.c_str()); + _CLTHROWA(CL_ERR_IO, e.c_str()); } } diff --git a/be/src/olap/rowset/segment_v2/inverted_index_writer.cpp b/be/src/olap/rowset/segment_v2/inverted_index_writer.cpp index ab5d3548df..fcf125b2fa 100644 --- a/be/src/olap/rowset/segment_v2/inverted_index_writer.cpp +++ b/be/src/olap/rowset/segment_v2/inverted_index_writer.cpp @@ -409,7 +409,9 @@ public: FINALLY_FINALIZE_OUTPUT(meta_out) FINALLY_FINALIZE_OUTPUT(data_out) FINALLY_FINALIZE_OUTPUT(index_out) - FINALLY_FINALIZE_OUTPUT(dir) + if constexpr (field_is_numeric_type(field_type)) { + FINALLY_FINALIZE_OUTPUT(dir) + } LOG(WARNING) << "Inverted index writer finish error occurred: " << e.what(); return Status::Error<doris::ErrorCode::INVERTED_INDEX_CLUCENE_ERROR>( "Inverted index writer finish error occurred"); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org