]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Bilog trim takes markers as string view
authorAdam C. Emerson <aemerson@redhat.com>
Tue, 27 Apr 2021 23:31:57 +0000 (19:31 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Mon, 13 Sep 2021 16:27:51 +0000 (12:27 -0400)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/cls/rgw/cls_rgw_client.h
src/rgw/services/svc_bilog_rados.cc
src/rgw/services/svc_bilog_rados.h

index 74cc25f0eaab557807afdd2a4b970f61de7abeb7..198c4cfd452bf3f2a5394915ec9397e7d09de9ff 100644 (file)
@@ -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<std::string> shards;
     get_str_vec(composed_marker, SHARDS_SEPARATOR.c_str(), shards);
index 69f87f1f9c5066257adca4277ad5747c84c6edeb..f4bb13ec1f05f79c53898e9a7789906add353226 100644 (file)
@@ -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<int, string> bucket_objs;
index e8a4abb2af0085ccb073801d890ca395eb10ae66..a7a3b342cf4df382877dfd6359d9ed2a4bcd32c7 100644 (file)
@@ -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,