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

Commit

Permalink
Merge pull request aquarist-labs#235 from jecluis/wip-fix-656
Browse files Browse the repository at this point in the history
rgw/sfs: delete multiparts only on existing buckets
  • Loading branch information
jecluis authored Oct 24, 2023
2 parents 7744b04 + a7a55bf commit 4976c75
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 4976c75

Please sign in to comment.