Skip to content

Commit

Permalink
cloud_storage: replace empty dir type with fragmented vector
Browse files Browse the repository at this point in the history
It's typically unexpected for this container to grow large, but we've
seen it before during manual intervention on a node: when trying to
quickly clear out recent data from a cache directory.

(cherry picked from commit 6c59b7a)
  • Loading branch information
andrwng authored and vbotbuildovich committed Aug 30, 2023
1 parent 430b6bf commit e30ad57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/v/cloud_storage/recursive_directory_walker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ss::future<walk_result> recursive_directory_walker::walk(
// Object to accumulate data as we walk directories
walk_accumulator state(start_dir, tracker);

std::vector<ss::sstring> empty_dirs;
fragmented_vector<ss::sstring> empty_dirs;

while (!state.empty()) {
auto target = state.pop();
Expand Down
2 changes: 1 addition & 1 deletion src/v/cloud_storage/recursive_directory_walker.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct file_list_item {
struct walk_result {
uint64_t cache_size{0};
fragmented_vector<file_list_item> regular_files;
std::vector<ss::sstring> empty_dirs;
fragmented_vector<ss::sstring> empty_dirs;
};

class recursive_directory_walker {
Expand Down

0 comments on commit e30ad57

Please sign in to comment.