From 2e4dcb2bc26b8e29a1eb82d1b4f6ab0fe2266d2c Mon Sep 17 00:00:00 2001 From: bobhan1 Date: Thu, 19 Dec 2024 12:15:15 +0800 Subject: [PATCH] update --- cloud/src/recycler/recycler.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cloud/src/recycler/recycler.cpp b/cloud/src/recycler/recycler.cpp index 6877d7e433b253e..4418c0a9f99c706 100644 --- a/cloud/src/recycler/recycler.cpp +++ b/cloud/src/recycler/recycler.cpp @@ -1416,6 +1416,8 @@ int InstanceRecycler::delete_rowset_data(const std::vector file_paths std::map> resource_file_paths; + // (resource_id, tablet_id, rowset_id) + std::vector> rowsets_delete_by_prefix; for (const auto& rs : rowsets) { { @@ -1486,6 +1488,12 @@ int InstanceRecycler::delete_rowset_data(const std::vectordelete_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 rets = concurrent_delete_executor.when_all(&finished); for (int r : rets) {