Skip to content
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

Merged
merged 2 commits into from Mar 29, 2021
Merged

The thread pool name should be not longer than 15 chars #22122

merged 2 commits into from Mar 29, 2021

Conversation

fastio
Copy link
Contributor

@fastio fastio commented Mar 25, 2021

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Bug Fix

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.

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Mar 25, 2021
{
setThreadName(thread_name.c_str());
}
catch (const DB::Exception &)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code does nothing.

Copy link
Contributor Author

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 ?

Copy link
Member

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.

Copy link
Contributor Author

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.

@alexey-milovidov alexey-milovidov self-assigned this Mar 25, 2021
@@ -1538,7 +1538,7 @@ BackgroundSchedulePool & Context::getMessageBrokerSchedulePool() const
shared->message_broker_schedule_pool.emplace(
settings.background_message_broker_schedule_pool_size,
CurrentMetrics::BackgroundDistributedSchedulePoolTask,
"BgMsgBrkSchPool");
Copy link
Member

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

Copy link
Contributor Author

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.

@fastio fastio changed the title The thread pool name should not longer than 15 chars The thread pool name should be not longer than 15 chars Mar 26, 2021
@alexey-milovidov alexey-milovidov merged commit 3bc170e into ClickHouse:master Mar 29, 2021
robot-clickhouse pushed a commit that referenced this pull request Mar 29, 2021
robot-clickhouse pushed a commit that referenced this pull request Mar 29, 2021
alexey-milovidov added a commit that referenced this pull request Mar 30, 2021
Backport #22122 to 21.3: The thread pool name should be not longer than 15 chars
alexey-milovidov added a commit that referenced this pull request Mar 30, 2021
Backport #22122 to 21.2: The thread pool name should be not longer than 15 chars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix Pull request with bugfix, not backported by default
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants