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

rgw/sfs: delete multiparts only on existing buckets #235

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading