Skip to content

Commit

Permalink
reuse get binlog path
Browse files Browse the repository at this point in the history
  • Loading branch information
luennng committed Mar 7, 2024
1 parent 28d4c44 commit 41f0c77
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions be/src/olap/tablet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2715,17 +2715,12 @@ void Tablet::gc_binlogs(int64_t version) {

// add binlog segment files and index files
for (int64_t i = 0; i < num_segments; ++i) {
auto segment_file = fmt::format("{}_{}.dat", rowset_id, i);
wait_for_deleted_binlog_files.emplace_back(
fmt::format("{}/_binlog/{}", tablet_path, segment_file));
wait_for_deleted_binlog_files.emplace_back(get_segment_filepath(rowset_id, i));
for (const auto& index : this->tablet_schema()->indexes()) {
if (index.index_type() != IndexType::INVERTED) {
continue;
}
auto segment_index_file =
fmt::format("{}_{}_{}.idx", rowset_id, i, index.index_id());
wait_for_deleted_binlog_files.emplace_back(
fmt::format("{}/_binlog/{}", tablet_path, segment_index_file));
wait_for_deleted_binlog_files.emplace_back(get_segment_index_filepath(rowset_id, i, index.index_id()));
}
}
};
Expand Down

0 comments on commit 41f0c77

Please sign in to comment.