Skip to content

Commit

Permalink
[Fix](recycler) Fix retain inverted indexes in tmp rowset recycling (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
Yukang-Lian authored Feb 6, 2025
1 parent 017f85f commit 3fb37ce
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cloud/src/recycler/recycler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1544,6 +1544,7 @@ int InstanceRecycler::delete_rowset_data(const std::vector<doris::RowsetMetaClou
// Currently index_ids is guaranteed to be empty,
// but we clear it again here as a safeguard against future code changes
// that might cause index_ids to no longer be empty
index_format = InvertedIndexStorageFormatPB::V2;
index_ids.clear();
} else {
LOG(WARNING) << "failed to get schema kv for rowset, instance_id=" << instance_id_
Expand All @@ -1569,6 +1570,12 @@ int InstanceRecycler::delete_rowset_data(const std::vector<doris::RowsetMetaClou
// try to recycle inverted index v2 when get_ret == 1
// we treat schema not found as if it has a v2 format inverted index
// to reduce chance of data leakage
if (inverted_index_get_ret == 1) {
LOG_INFO("delete rowset data schema kv not found, try to delete index file")
.tag("instance_id", instance_id_)
.tag("inverted index v2 path",
inverted_index_path_v2(tablet_id, rowset_id, i));
}
file_paths.push_back(inverted_index_path_v2(tablet_id, rowset_id, i));
}
}
Expand Down

0 comments on commit 3fb37ce

Please sign in to comment.