Skip to content

Commit

Permalink
Merge pull request #22543 from vbotbuildovich/backport-pr-22335-v23.3…
Browse files Browse the repository at this point in the history
….x-472
  • Loading branch information
WillemKauf authored Jul 27, 2024
2 parents 9026af5 + ebdae37 commit f3cd1fd
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/v/archival/purger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,24 @@ purger::collect_manifest_paths(
continue;
}

collected.spillover.push_back(std::move(item.key));
// The spillover manifest path is of the form
// "{prefix}/{manifest.bin().x.x.x.x.x.x}" Find the index of the last
// '/' in the path, so we can check just the filename (starting from the
// first character after '/').
const size_t filename_idx = path.rfind('/');
if (filename_idx == std::string_view::npos) {
continue;
}

// File should start with "manifest.bin()", but it should have
// additional spillover components as well.
std::string_view file = path.substr(filename_idx + 1);
static const ss::sstring partition_manifest_filename = "manifest.bin";
if (
file.starts_with(partition_manifest_filename)
&& !file.ends_with(partition_manifest_filename)) {
collected.spillover.push_back(std::move(item.key));
}
}

co_return collected;
Expand Down

0 comments on commit f3cd1fd

Please sign in to comment.