Skip to content

Commit

Permalink
Revert "update" for re-produce problem
Browse files Browse the repository at this point in the history
This reverts commit f7661bc.
  • Loading branch information
bobhan1 committed Dec 19, 2024
1 parent d24d4e5 commit 5c9502c
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions cloud/src/recycler/recycler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1416,8 +1416,6 @@ int InstanceRecycler::delete_rowset_data(const std::vector<doris::RowsetMetaClou
int ret = 0;
// resource_id -> file_paths
std::map<std::string, std::vector<std::string>> resource_file_paths;
// (resource_id, tablet_id, rowset_id)
std::vector<std::tuple<std::string, int64_t, std::string>> rowsets_delete_by_prefix;

for (const auto& rs : rowsets) {
{
Expand Down Expand Up @@ -1488,12 +1486,6 @@ int InstanceRecycler::delete_rowset_data(const std::vector<doris::RowsetMetaClou
index_format = index_info.first;
index_ids = std::move(index_info.second);
}
if (rs.rowset_state() == RowsetStatePB::BEGIN_PARTIAL_UPDATE) {
// if rowset state is RowsetStatePB::BEGIN_PARTIAL_UPDATE, the num of segments may be bigger than num_segments
// so we need to delete the rowset's data by prefix
rowsets_delete_by_prefix.emplace_back(rs.resource_id(), tablet_id, rs.rowset_id_v2());
continue;
}
for (int64_t i = 0; i < num_segments; ++i) {
file_paths.push_back(segment_path(tablet_id, rowset_id, i));
if (index_format == InvertedIndexStorageFormatPB::V1) {
Expand All @@ -1517,10 +1509,6 @@ int InstanceRecycler::delete_rowset_data(const std::vector<doris::RowsetMetaClou
return accessor->delete_files(*paths);
});
}
for (const auto& [resource_id, tablet_id, rowset_id] : rowsets_delete_by_prefix) {
concurrent_delete_executor.add(
[&]() -> int { return delete_rowset_data(resource_id, tablet_id, rowset_id); });
}
bool finished = true;
std::vector<int> rets = concurrent_delete_executor.when_all(&finished);
for (int r : rets) {
Expand Down

0 comments on commit 5c9502c

Please sign in to comment.