Skip to content

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

Merged
alexey-milovidov merged 2 commits intoClickHouse:masterfrom
fastio:fix_thread_pool_name_exception
Mar 29, 2021
Merged

The thread pool name should be not longer than 15 chars#22122
alexey-milovidov merged 2 commits intoClickHouse:masterfrom
fastio:fix_thread_pool_name_exception

Conversation

@fastio
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
shared->message_broker_schedule_pool.emplace(
settings.background_message_broker_schedule_pool_size,
CurrentMetrics::BackgroundDistributedSchedulePoolTask,
"BgMsgBrkSchPool");
Copy link
Copy Markdown
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
Copy Markdown
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.

4 participants