From: Adam C. Emerson Date: Tue, 27 Apr 2021 23:31:57 +0000 (-0400) Subject: rgw: Bilog trim takes markers as string view X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=13126e02b8a7d47ea4f775e3261dcfcc22017c71;p=ceph.git rgw: Bilog trim takes markers as string view Signed-off-by: Adam C. Emerson --- diff --git a/src/cls/rgw/cls_rgw_client.h b/src/cls/rgw/cls_rgw_client.h index 74cc25f0eaab5..198c4cfd452bf 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,