[Core][Tiny]Shorter thread name (#23222)

In linux the thread name could not be longer than 15 chars.
When we use command like top, we are easy being confused by similar thread name like `resource_report_poller` and `resource_report_broadcaster` because they are both show `resource_report`.

This pr uses abbr to make the thread names shorter.
This commit is contained in:
Tao Wang 2022-03-18 09:58:32 +08:00 committed by GitHub
parent ea51017e52
commit b4bc8809dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@ GcsServerAddressUpdater::GcsServerAddressUpdater(
update_func_(update_func),
updater_runner_(updater_io_service_),
updater_thread_([this] {
SetThreadName("gcs_address_updater");
SetThreadName("gcs_addr_updater");
std::thread::id this_id = std::this_thread::get_id();
RAY_LOG(INFO) << "GCS Server updater thread id: " << this_id;
/// The asio work to keep io_service_ alive.

View file

@ -45,7 +45,7 @@ void GcsResourceReportPoller::Initialize(const GcsInitData &gcs_init_data) {
void GcsResourceReportPoller::Start() {
polling_thread_.reset(new std::thread{[this]() {
SetThreadName("resource_report_poller");
SetThreadName("resource_poller");
boost::asio::io_service::work work(polling_service_);
polling_service_.run();

View file

@ -53,7 +53,7 @@ class RaySyncer {
void Start() {
poller_->Start();
broadcast_thread_ = std::make_unique<std::thread>([this]() {
SetThreadName("resource_report_broadcaster");
SetThreadName("resource_bcast");
boost::asio::io_service::work work(broadcast_service_);
broadcast_service_.run();
});