diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 106b65e19d2fc0..108aa45c905981 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -2810,6 +2810,7 @@ class RGWRadosThread { }; Worker *worker; + const char *thread_name; protected: CephContext *cct; @@ -2820,7 +2821,8 @@ class RGWRadosThread { virtual uint64_t interval_msec() = 0; virtual void stop_process() {} public: - RGWRadosThread(RGWRados *_store) : worker(NULL), cct(_store->ctx()), store(_store) {} + RGWRadosThread(RGWRados *_store, const char *thread_name = "radosgw") + : worker(NULL), thread_name(thread_name), cct(_store->ctx()), store(_store) {} virtual ~RGWRadosThread() { stop(); } @@ -2836,7 +2838,7 @@ class RGWRadosThread { void RGWRadosThread::start() { worker = new Worker(cct, this); - worker->create("radosgw"); + worker->create(thread_name); } void RGWRadosThread::stop() @@ -2903,7 +2905,7 @@ class RGWMetaNotifier : public RGWRadosThread { } public: RGWMetaNotifier(RGWRados *_store, RGWMetadataLog* log) - : RGWRadosThread(_store), notify_mgr(_store), log(log) {} + : RGWRadosThread(_store, "meta_notify"), notify_mgr(_store), log(log) {} int process(); }; @@ -2934,7 +2936,8 @@ class RGWDataNotifier : public RGWRadosThread { return cct->_conf->rgw_md_notify_interval_msec; } public: - RGWDataNotifier(RGWRados *_store) : RGWRadosThread(_store), notify_mgr(_store) {} + RGWDataNotifier(RGWRados *_store) + : RGWRadosThread(_store, "data_notify"), notify_mgr(_store) {} int process(); }; @@ -2964,7 +2967,8 @@ int RGWDataNotifier::process() class RGWSyncProcessorThread : public RGWRadosThread { public: - RGWSyncProcessorThread(RGWRados *_store) : RGWRadosThread(_store) {} + RGWSyncProcessorThread(RGWRados *_store, const char *thread_name = "radosgw") + : RGWRadosThread(_store, thread_name) {} virtual ~RGWSyncProcessorThread() {} virtual int init() = 0 ; virtual int process() = 0; @@ -2982,7 +2986,7 @@ class RGWMetaSyncProcessorThread : public RGWSyncProcessorThread } public: RGWMetaSyncProcessorThread(RGWRados *_store, RGWAsyncRadosProcessor *async_rados) - : RGWSyncProcessorThread(_store), sync(_store, async_rados) {} + : RGWSyncProcessorThread(_store, "meta_sync"), sync(_store, async_rados) {} void wakeup_sync_shards(set& shard_ids) { for (set::iterator iter = shard_ids.begin(); iter != shard_ids.end(); ++iter) { @@ -3025,7 +3029,8 @@ class RGWDataSyncProcessorThread : public RGWSyncProcessorThread public: RGWDataSyncProcessorThread(RGWRados *_store, RGWAsyncRadosProcessor *async_rados, const string& _source_zone) - : RGWSyncProcessorThread(_store), sync(_store, async_rados, _source_zone), + : RGWSyncProcessorThread(_store, "data_sync"), + sync(_store, async_rados, _source_zone), initialized(false) {} void wakeup_sync_shards(map >& shard_ids) { @@ -3068,7 +3073,7 @@ class RGWSyncLogTrimThread : public RGWSyncProcessorThread void stop_process() override { crs.stop(); } public: RGWSyncLogTrimThread(RGWRados *store, int interval) - : RGWSyncProcessorThread(store), + : RGWSyncProcessorThread(store, "sync_log_trim"), crs(store->ctx(), store->get_cr_registry()), store(store), http(store->ctx(), crs.get_completion_mgr()), trim_interval(interval, 0)