]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/posix: Account for incomplete uploads during deletes
authorSamarah Uriarte <samarah.uriarte@ibm.com>
Tue, 11 Nov 2025 21:24:25 +0000 (15:24 -0600)
committerSamarah Uriarte <samarah.uriarte@ibm.com>
Tue, 11 Nov 2025 21:24:25 +0000 (15:24 -0600)
Signed-off-by: Samarah Uriarte <samarah.uriarte@ibm.com>
src/rgw/driver/posix/rgw_sal_posix.cc

index e3bf6838ad6e2395b8153217e0bc87cf85589ac7..3406d605fdd77120324863e0c57c3ab6ee544d97 100644 (file)
@@ -2755,7 +2755,11 @@ int POSIXBucket::check_empty(const DoutPrefixProvider* dpp, optional_yield y)
 {
   return dir->for_each(dpp, [](const char* name) {
     /* for_each filters out "." and "..", so reaching here is not empty */
-    return -ENOTEMPTY;
+    std::string_view check_name = name;
+    if (!check_name.starts_with(".multipart")) { // incomplete uploads can be deleted
+      return -ENOTEMPTY;
+    }
+    return 0;
   });
 }