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

Commit

Permalink
rgw/sfs: delete multiparts only on existing buckets
Browse files Browse the repository at this point in the history
Signed-off-by: Joao Eduardo Luis <[email protected]>
  • Loading branch information
jecluis committed Oct 22, 2023
1 parent 92347c9 commit a7a55bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rgw/driver/sfs/sqlite/sqlite_multipart.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ int SQLiteMultipart::abort_multiparts_by_bucket_id(const std::string& bucket_id
int SQLiteMultipart::abort_multiparts(const std::string& bucket_name) const {
auto storage = conn->get_storage();
auto bucket_ids_vec = storage.select(
&DBBucket::bucket_id, where(is_equal(&DBBucket::bucket_name, bucket_name))
&DBBucket::bucket_id,
where(
is_equal(&DBBucket::bucket_name, bucket_name) and
is_equal(&DBBucket::deleted, false)
)
);
if (bucket_ids_vec.size() == 0) {
return -ERR_NO_SUCH_BUCKET;
Expand Down

0 comments on commit a7a55bf

Please sign in to comment.