From 55af2e10c791db34771a131932f596282dd215a2 Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Tue, 27 Apr 2021 19:31:57 -0400 Subject: [PATCH] rgw: Bilog trim takes markers as string view Signed-off-by: Adam C. Emerson --- src/cls/rgw/cls_rgw_client.h | 2 +- src/rgw/services/svc_bilog_rados.cc | 7 ++++++- src/rgw/services/svc_bilog_rados.h | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/cls/rgw/cls_rgw_client.h b/src/cls/rgw/cls_rgw_client.h index 585cb3d40dfd6..508ea7089a276 100644 --- a/src/cls/rgw/cls_rgw_client.h +++ b/src/cls/rgw/cls_rgw_client.h @@ -219,7 +219,7 @@ public: * 2. One or more shards, shard id specified for each shard, e.g., 0#00002.12,1#00003.23.2 * */ - int from_string(const std::string& composed_marker, int shard_id) { + int from_string(std::string_view composed_marker, int shard_id) { value_by_shards.clear(); std::vector shards; get_str_vec(composed_marker, SHARDS_SEPARATOR.c_str(), shards); diff --git a/src/rgw/services/svc_bilog_rados.cc b/src/rgw/services/svc_bilog_rados.cc index 69f87f1f9c506..f4bb13ec1f05f 100644 --- a/src/rgw/services/svc_bilog_rados.cc +++ b/src/rgw/services/svc_bilog_rados.cc @@ -19,7 +19,12 @@ void RGWSI_BILog_RADOS::init(RGWSI_BucketIndex_RADOS *bi_rados_svc) svc.bi = bi_rados_svc; } -int RGWSI_BILog_RADOS::log_trim(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw::bucket_log_layout_generation& log_layout, int shard_id, string& start_marker, string& end_marker) +int RGWSI_BILog_RADOS::log_trim(const DoutPrefixProvider *dpp, + const RGWBucketInfo& bucket_info, + const rgw::bucket_log_layout_generation& log_layout, + int shard_id, + std::string_view start_marker, + std::string_view end_marker) { RGWSI_RADOS::Pool index_pool; map bucket_objs; diff --git a/src/rgw/services/svc_bilog_rados.h b/src/rgw/services/svc_bilog_rados.h index e8a4abb2af008..a7a3b342cf4df 100644 --- a/src/rgw/services/svc_bilog_rados.h +++ b/src/rgw/services/svc_bilog_rados.h @@ -41,8 +41,8 @@ public: int log_trim(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw::bucket_log_layout_generation& log_layout, int shard_id, - std::string& start_marker, - std::string& end_marker); + std::string_view start_marker, + std::string_view end_marker); int log_list(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw::bucket_log_layout_generation& log_layout, int shard_id, -- 2.39.5