Skip to content

Commit

Permalink
[fix] (inverted index) fix index file in gc binlogs
Browse files Browse the repository at this point in the history
  • Loading branch information
csun5285 committed Dec 4, 2024
1 parent 04e58bc commit 7b0c52f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions be/src/olap/tablet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2654,9 +2654,17 @@ void Tablet::gc_binlogs(int64_t version) {
// add binlog segment files and index files
for (int64_t i = 0; i < num_segments; ++i) {
wait_for_deleted_binlog_files.emplace_back(get_segment_filepath(rowset_id, i));
for (const auto& index : this->tablet_schema()->inverted_indexes()) {

// index files
if (this->tablet_schema()->get_inverted_index_storage_format() ==
InvertedIndexStorageFormatPB::V1) {
for (const auto& index : this->tablet_schema()->inverted_indexes()) {
wait_for_deleted_binlog_files.emplace_back(
get_segment_index_filepath(rowset_id, i, index->index_id()));
}
} else {
wait_for_deleted_binlog_files.emplace_back(
get_segment_index_filepath(rowset_id, i, index->index_id()));
get_segment_index_filepath(rowset_id, i, -1));
}
}
};
Expand Down

0 comments on commit 7b0c52f

Please sign in to comment.