This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 8b6d6245fac [fix](inverted index) the rowset may be deleted and become
nullptr. #33878 (#34464)
8b6d6245fac is described below
commit 8b6d6245fac7f2c97b6cc9c6f4bfb26b007da590
Author: zzzxl <[email protected]>
AuthorDate: Wed May 8 09:11:22 2024 +0800
[fix](inverted index) the rowset may be deleted and become nullptr. #33878
(#34464)
---
be/src/olap/compaction.cpp | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/be/src/olap/compaction.cpp b/be/src/olap/compaction.cpp
index 367702b4f76..38f4c998201 100644
--- a/be/src/olap/compaction.cpp
+++ b/be/src/olap/compaction.cpp
@@ -476,11 +476,9 @@ Status Compaction::do_compaction_impl(int64_t permits) {
// src index files
// format: rowsetId_segmentId
std::vector<std::string> src_index_files(src_segment_num);
- std::vector<RowsetId> src_rowset_ids;
for (const auto& m : src_seg_to_id_map) {
std::pair<RowsetId, uint32_t> p = m.first;
src_index_files[m.second] = p.first.to_string() + "_" +
std::to_string(p.second);
- src_rowset_ids.push_back(p.first);
}
// dest index files
@@ -623,9 +621,8 @@ Status Compaction::do_compaction_impl(int64_t permits) {
// if index properties are different, index compaction maybe
needs to be skipped.
bool is_continue = false;
std::optional<std::map<std::string, std::string>>
first_properties;
- for (const auto& rowset_id : src_rowset_ids) {
- auto rowset_ptr = _tablet->get_rowset(rowset_id);
- const auto* tablet_index =
rowset_ptr->tablet_schema()->get_inverted_index(col);
+ for (const auto& rowset : _input_rowsets) {
+ const auto* tablet_index =
rowset->tablet_schema()->get_inverted_index(col);
const auto& properties = tablet_index->properties();
if (!first_properties.has_value()) {
first_properties = properties;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]