]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgwlc: define RGWLC::thr_name() and use it to name lc lock cookies 46248/head
authorMatt Benjamin <mbenjamin@redhat.com>
Wed, 25 May 2022 19:37:36 +0000 (15:37 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 29 Jul 2022 16:34:30 +0000 (12:34 -0400)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_lc.cc
src/rgw/rgw_lc.h

index ad0936612b4e5e3568834abb4917555987550f48..08f705d5e8b9af55f9cd1e86f61b4d3f6e2b9785 100644 (file)
@@ -1902,8 +1902,7 @@ int RGWLC::process_bucket(int index, int max_lock_secs, LCWorker* worker,
   int ret = 0;
   std::unique_ptr<rgw::sal::LCSerializer> serializer =
     sal_lc->get_serializer(lc_index_lock_name, obj_names[index],
-                          std::string());
-
+                          worker->thr_name());
   std::unique_ptr<rgw::sal::Lifecycle::LCEntry> entry;
   if (max_lock_secs <= 0) {
     return -EAGAIN;
@@ -2054,7 +2053,7 @@ int RGWLC::process(int index, int max_lock_secs, LCWorker* worker,
          << dendl;
 
   std::unique_ptr<rgw::sal::LCSerializer> lock =
-    sal_lc->get_serializer(lc_index_lock_name, lc_shard, std::string());
+    sal_lc->get_serializer(lc_index_lock_name, lc_shard, worker->thr_name());
 
   utime_t lock_for_s(max_lock_secs, 0);
   const auto& lock_lambda = [&]() {
index e08877a35131d79859fc530f7acdf7367d84954c..8b3ab7c71d1ab5a439cab47f288e21bd2bf153d7 100644 (file)
@@ -548,6 +548,11 @@ public:
     LCWorker(const DoutPrefixProvider* dpp, CephContext *_cct, RGWLC *_lc,
             int ix);
     RGWLC* get_lc() { return lc; }
+
+    std::string thr_name() {
+      return std::string{"lc_thrd: "} + std::to_string(ix);
+    }
+
     void *entry() override;
     void stop();
     bool should_work(utime_t& now);