Skip to content

Commit b89d55d

Browse files
Yukang-LianYour Name
authored and
Your Name
committed
[Fix](recycler) Fix retain inverted indexes in tmp rowset recycling (#47536)
Related PR: #47475 #47486
1 parent 989973f commit b89d55d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cloud/src/recycler/recycler.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -1544,6 +1544,7 @@ int InstanceRecycler::delete_rowset_data(const std::vector<doris::RowsetMetaClou
15441544
// Currently index_ids is guaranteed to be empty,
15451545
// but we clear it again here as a safeguard against future code changes
15461546
// that might cause index_ids to no longer be empty
1547+
index_format = InvertedIndexStorageFormatPB::V2;
15471548
index_ids.clear();
15481549
} else {
15491550
LOG(WARNING) << "failed to get schema kv for rowset, instance_id=" << instance_id_
@@ -1569,6 +1570,12 @@ int InstanceRecycler::delete_rowset_data(const std::vector<doris::RowsetMetaClou
15691570
// try to recycle inverted index v2 when get_ret == 1
15701571
// we treat schema not found as if it has a v2 format inverted index
15711572
// to reduce chance of data leakage
1573+
if (inverted_index_get_ret == 1) {
1574+
LOG_INFO("delete rowset data schema kv not found, try to delete index file")
1575+
.tag("instance_id", instance_id_)
1576+
.tag("inverted index v2 path",
1577+
inverted_index_path_v2(tablet_id, rowset_id, i));
1578+
}
15721579
file_paths.push_back(inverted_index_path_v2(tablet_id, rowset_id, i));
15731580
}
15741581
}

0 commit comments

Comments
 (0)