throw err;
}
});
- const auto rc = ceph_pthread_setname(workers.back().native_handle(),
- (WORKER_THREAD_NAME+std::to_string(worker_id)).c_str());
- ceph_assert(rc == 0);
+ const auto thread_name = WORKER_THREAD_NAME+std::to_string(worker_id);
+ if (const auto rc = ceph_pthread_setname(workers.back().native_handle(), thread_name.c_str()); rc != 0) {
+ ldpp_dout(this, 1) << "ERROR: failed to set notification manager thread name to: " << thread_name
+ << ". error: " << rc << dendl;
+ }
}
ldpp_dout(this, 10) << "INfO: started notification manager with: " << worker_count << " workers" << dendl;
}
// when a new connection is added.
connections.max_load_factor(10.0);
// give the runner thread a name for easier debugging
- const auto rc = ceph_pthread_setname(runner.native_handle(), "amqp_manager");
- ceph_assert(rc==0);
+ const char* thread_name = "amqp_manager";
+ if (const auto rc = ceph_pthread_setname(runner.native_handle(), thread_name); rc != 0) {
+ ldout(cct, 1) << "ERROR: failed to set amqp manager thread name to: " << thread_name
+ << ". error: " << rc << dendl;
+ }
}
// non copyable
// when a new connection is added.
connections.max_load_factor(10.0);
// give the runner thread a name for easier debugging
- const auto rc = ceph_pthread_setname(runner.native_handle(), "kafka_manager");
- ceph_assert(rc==0);
+ const char* thread_name = "kafka_manager";
+ if (const auto rc = ceph_pthread_setname(runner.native_handle(), thread_name); rc != 0) {
+ ldout(cct, 1) << "ERROR: failed to set kafka manager thread name to: " << thread_name
+ << ". error: " << rc << dendl;
+ }
}
// non copyable
}
started = true;
runner = std::thread(&Background::run, this);
- const auto rc = ceph_pthread_setname(runner.native_handle(),
- "lua_background");
- ceph_assert(rc == 0);
+ const char* thread_name = "lua_background";
+ if (const auto rc = ceph_pthread_setname(runner.native_handle(), thread_name); rc != 0) {
+ ldout(cct, 1) << "ERROR: failed to set lua background thread name to: " << thread_name
+ << ". error: " << rc << dendl;
+ }
}
void Background::pause() {
void start() {
ldpp_dout(this, 20) << "starting ratelimit_gc thread" << dendl;
runner = std::thread(&ActiveRateLimiter::replace_active, this);
- const auto rc = ceph_pthread_setname(runner.native_handle(), "ratelimit_gc");
- ceph_assert(rc==0);
+ if (const auto rc = ceph_pthread_setname(runner.native_handle(), "ratelimit_gc"); rc != 0) {
+ ldpp_dout(this, 1) << "ERROR: failed to set ratelimit_gc thread name. error: " << rc << dendl;
+ }
}
};