From 1d2c6cf08393ebad89ec48dd339bb6f961845447 Mon Sep 17 00:00:00 2001 From: Joao Eduardo Luis Date: Thu, 23 Nov 2023 04:46:27 +0000 Subject: [PATCH] rgw/sfs: ignore deleted buckets on list multipart Fixes: aquarist-labs/s3gw#826 Signed-off-by: Joao Eduardo Luis --- src/rgw/driver/sfs/sqlite/sqlite_multipart.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/rgw/driver/sfs/sqlite/sqlite_multipart.cc b/src/rgw/driver/sfs/sqlite/sqlite_multipart.cc index 0804733378aa1..25d0498600ded 100644 --- a/src/rgw/driver/sfs/sqlite/sqlite_multipart.cc +++ b/src/rgw/driver/sfs/sqlite/sqlite_multipart.cc @@ -37,9 +37,10 @@ std::optional> SQLiteMultipart::list_multiparts( ) const { auto storage = conn->get_storage(); - auto bucket_entries = storage->get_all( - where(is_equal(&DBBucket::bucket_name, bucket_name)) - ); + auto bucket_entries = storage->get_all(where( + is_equal(&DBBucket::bucket_name, bucket_name) and + is_equal(&DBBucket::deleted, false) + )); if (bucket_entries.size() == 0) { return std::nullopt; }