Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
rgw/sfs: ignore deleted buckets on list multipart
Browse files Browse the repository at this point in the history
Fixes: aquarist-labs/s3gw#826

Signed-off-by: Joao Eduardo Luis <[email protected]>
  • Loading branch information
jecluis committed Nov 23, 2023
1 parent d4b05d4 commit 1d2c6cf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/rgw/driver/sfs/sqlite/sqlite_multipart.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ std::optional<std::vector<DBMultipart>> SQLiteMultipart::list_multiparts(
) const {
auto storage = conn->get_storage();

auto bucket_entries = storage->get_all<DBBucket>(
where(is_equal(&DBBucket::bucket_name, bucket_name))
);
auto bucket_entries = storage->get_all<DBBucket>(where(
is_equal(&DBBucket::bucket_name, bucket_name) and
is_equal(&DBBucket::deleted, false)
));
if (bucket_entries.size() == 0) {
return std::nullopt;
}
Expand Down

0 comments on commit 1d2c6cf

Please sign in to comment.