From 957e221f1ffc73726187aba99e9e103291b0ba6f Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Wed, 24 May 2017 16:50:26 +0200 Subject: [PATCH] rgw: list_objects() honors end_marker regardless of namespace. This patch fixes a regression related to handling of the end_marker parameter during Swift's container listing operation. It has been introduced in a5d1fa0587184f43c69d8e03114b58d43f320781 and causes Tempest's test_list_container_contents_with_end_marker to fail. Fixes: http://tracker.ceph.com/issues/18977 Signed-off-by: Radoslaw Zarzynski (cherry picked from commit 09db1e412ef0853e7f345f813c8d452ec8354c36) --- src/rgw/rgw_rados.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 9df547a19ade5..5544b4e6038fd 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -5557,17 +5557,13 @@ int RGWRados::Bucket::List::list_objects(int64_t max, result->clear(); rgw_obj_key marker_obj(params.marker.name, params.marker.instance, params.ns); - - rgw_obj_key end_marker_obj; - rgw_obj_index_key cur_end_marker; - if (!params.ns.empty()) { - end_marker_obj = rgw_obj_key(params.end_marker.name, params.end_marker.instance, params.ns); - end_marker_obj.ns = params.ns; - end_marker_obj.get_index_key(&cur_end_marker); - } 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.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(); rgw_obj_key prefix_obj(params.prefix); -- 2.39.5