]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: radoslist incomplete multipart uploads fix marker progression 36191/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Tue, 23 Jun 2020 16:55:39 +0000 (12:55 -0400)
committerNathan Cutler <ncutler@suse.com>
Sat, 18 Jul 2020 20:37:31 +0000 (22:37 +0200)
When the radosgw-admin radoslist was running, the portion where it
lists the incomplete multipart uploads did not handle the marker
correctly between calls to the ordered list op. This fixes those
issues and does some additional clean-up.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit 653848da4ae67a45a5d72b0daece86de939f5e15)

src/rgw/rgw_orphan.cc

index 32dea42fcdd23235dea920220ced7a7e8230faa4..832076b7f058981e10474d1e649bbb0e2990979d 100644 (file)
@@ -1445,20 +1445,14 @@ int RGWRadosList::do_incomplete_multipart(
 
   RGWRados::Bucket target(store, bucket_info);
   RGWRados::Bucket::List list_op(&target);
+  list_op.params.ns = mp_ns;
+  list_op.params.filter = &mp_filter;
+  // use empty string for initial list_op.params.marker
+  // use empty strings for list_op.params.{prefix,delim}
 
   bool is_listing_truncated;
-  std::string empty_string;
-  RGWMultipartUploadEntry next_uploads_marker;
 
   do {
-    RGWMPObj uploads_marker = next_uploads_marker.mp;
-    const std::string& marker_meta = uploads_marker.get_meta();
-    list_op.params.marker = marker_meta;
-    list_op.params.ns = mp_ns;
-    list_op.params.filter = &mp_filter;
-
-    // use empty strings for list_op.params.{prefix,delim}
-
     std::vector<rgw_bucket_dir_entry> objs;
     std::map<string, bool> common_prefixes;
     ret = list_op.list_objects(max_uploads, &objs, &common_prefixes,
@@ -1490,10 +1484,8 @@ int RGWRadosList::do_incomplete_multipart(
          " processing incomplete multipart entry " <<
          entry << dendl;
       }
-      next_uploads_marker = entry;
 
       // now process the uploads vector
-
       int parts_marker = 0;
       bool is_parts_truncated = false;
       do {
@@ -1525,7 +1517,7 @@ int RGWRadosList::do_incomplete_multipart(
        }
       } while (is_parts_truncated);
     } // if objs not empty
-  } while(is_listing_truncated);
+  } while (is_listing_truncated);
 
   return 0;
 } // RGWRadosList::do_incomplete_multipart