New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The thread pool name should be not longer than 15 chars #22122
The thread pool name should be not longer than 15 chars #22122
Conversation
src/Core/BackgroundSchedulePool.cpp
Outdated
{ | ||
setThreadName(thread_name.c_str()); | ||
} | ||
catch (const DB::Exception &) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code does nothing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Print log, and throw exception to caller ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exception will appear in log nevertheless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this code should be removed.
@@ -1538,7 +1538,7 @@ BackgroundSchedulePool & Context::getMessageBrokerSchedulePool() const | |||
shared->message_broker_schedule_pool.emplace( | |||
settings.background_message_broker_schedule_pool_size, | |||
CurrentMetrics::BackgroundDistributedSchedulePoolTask, | |||
"BgMsgBrkSchPool"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But Len("BgMsgBrkSchPool") is 15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the delay execution
thread's name (BgMsgBrkSchPool/D) is more than 15 chars.
Backport #22122 to 21.3: The thread pool name should be not longer than 15 chars
Backport #22122 to 21.2: The thread pool name should be not longer than 15 chars
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix the background thread pool name.
Detailed description / Documentation draft:
If the length of thread pool name is longer than 13 chars, the setThreadName will throw exception.
The `BgMsgBrkSchPool which used to poll message from Kafka and other queue is broken because the delay execution
thread's name (BgMsgBrkSchPool/D) is more than 15 chars. The Kafka engine with the broken thread pool will not consume the message from message queue.