]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix bug with (un)ordered bucket listing and marker w/ namespace
authorJ. Eric Ivancich <ivancich@redhat.com>
Fri, 31 Jan 2020 20:01:40 +0000 (15:01 -0500)
committerNathan Cutler <ncutler@suse.com>
Mon, 26 Oct 2020 17:44:10 +0000 (18:44 +0100)
When listing without specifying a namespace, the returned entries
could be in one or more namespaces. The marker used to continue the
listing may therefore contain a namespace, and that needs to be
preserved. This fixes a bug in both ordered and unordered listings
where it was not preserved.

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

Conflicts:
src/rgw/rgw_rados.cc
- trivial whitespace

src/rgw/rgw_rados.cc

index 526c5ed718dbcb7197177fba3a694781d8a5bd0b..48b586608b09dae909cf145cd4808b87afade905 100644 (file)
@@ -2438,12 +2438,15 @@ int RGWRados::Bucket::List::list_objects_ordered(
 
   // use a local marker; either the marker will have a previous entry
   // or it will be empty; either way it's OK to copy
-  rgw_obj_key marker_obj(params.marker.name, params.marker.instance, params.marker.ns);
+  rgw_obj_key marker_obj(params.marker.name,
+                        params.marker.instance,
+                        params.marker.ns);
   rgw_obj_index_key cur_marker;
   marker_obj.get_index_key(&cur_marker);
 
-  rgw_obj_key end_marker_obj(params.end_marker.name, params.end_marker.instance,
-                             params.end_marker.ns);
+  rgw_obj_key end_marker_obj(params.end_marker.name,
+                            params.end_marker.instance,
+                            params.end_marker.ns);
   rgw_obj_index_key cur_end_marker;
   end_marker_obj.get_index_key(&cur_end_marker);
   const bool cur_end_marker_valid = !params.end_marker.empty();