From b46ecc1d4f2e2356d81f198c9ab81293245dcf79 Mon Sep 17 00:00:00 2001 From: Samarah Uriarte Date: Tue, 11 Nov 2025 15:24:25 -0600 Subject: [PATCH] rgw/posix: Account for incomplete uploads during deletes Signed-off-by: Samarah Uriarte --- src/rgw/driver/posix/rgw_sal_posix.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rgw/driver/posix/rgw_sal_posix.cc b/src/rgw/driver/posix/rgw_sal_posix.cc index e3bf6838ad6e2..3406d605fdd77 100644 --- a/src/rgw/driver/posix/rgw_sal_posix.cc +++ b/src/rgw/driver/posix/rgw_sal_posix.cc @@ -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; }); } -- 2.39.5