The thread pool name should be not longer than 15 chars#22122
Merged
alexey-milovidov merged 2 commits intoClickHouse:masterfrom Mar 29, 2021
fastio:fix_thread_pool_name_exception
Merged
The thread pool name should be not longer than 15 chars#22122alexey-milovidov merged 2 commits intoClickHouse:masterfrom fastio:fix_thread_pool_name_exception
alexey-milovidov merged 2 commits intoClickHouse:masterfrom
fastio:fix_thread_pool_name_exception
Conversation
src/Core/BackgroundSchedulePool.cpp
Outdated
| { | ||
| setThreadName(thread_name.c_str()); | ||
| } | ||
| catch (const DB::Exception &) |
Member
There was a problem hiding this comment.
This code does nothing.
Contributor
Author
There was a problem hiding this comment.
Print log, and throw exception to caller ?
Member
There was a problem hiding this comment.
Exception will appear in log nevertheless.
Contributor
Author
There was a problem hiding this comment.
Ok, this code should be removed.
| shared->message_broker_schedule_pool.emplace( | ||
| settings.background_message_broker_schedule_pool_size, | ||
| CurrentMetrics::BackgroundDistributedSchedulePoolTask, | ||
| "BgMsgBrkSchPool"); |
Member
There was a problem hiding this comment.
But Len("BgMsgBrkSchPool") is 15
Contributor
Author
There was a problem hiding this comment.
the delay execution
thread's name (BgMsgBrkSchPool/D) is more than 15 chars.
alexey-milovidov
approved these changes
Mar 29, 2021
This was referenced 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.