You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ji...@apache.org on 2023/06/29 11:48:07 UTC
[doris] branch master updated: [Fix](inverted index) fix a bundle of inverted index exception process errors (#21328)
This is an automated email from the ASF dual-hosted git repository.
jianliangqi 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 d00326549f [Fix](inverted index) fix a bundle of inverted index exception process errors (#21328)
d00326549f is described below
commit d00326549f611f267ba1e65086ec1fd8bbed31b3
Author: airborne12 <ai...@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-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org