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

Fix ThreadPool creation #261

Merged
merged 2 commits into from
Feb 11, 2020
Merged

Conversation

jpbempel
Copy link
Member

@jpbempel jpbempel commented Feb 4, 2020

Executors.defaultThreadFactory() is creating a new ThreadFactory for each new thread created, messing up thread names and pool belongings.
Now, we are passing a pool name when building a new executor service, and handling counter for
threads belonging to this thread pool

Thread names before:
pool-2-thread-1
pool-3-thread-1
pool-4-thread-1
pool-5-thread-1

Thread names after:
jmxfetch-collectionPool-1
jmxfetch-collectionPool-2
jmxfetch-collectionPool-3
jmxfetch-recoveryPool-1

Executors.defaultThreadFactory is creating a new ThreadFactory for each new thread created,
messing up thread names and pool belongings.
Now, we are passing a pool name when building a new executor service, and handling counter for
threads belonging to this thread pool
@jpbempel jpbempel requested a review from a team February 4, 2020 14:36
Copy link
Contributor

@prognant prognant left a comment

Choose a reason for hiding this comment

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

LGTM, thanks ! 👍

Copy link
Member

@truthbk truthbk left a comment

Choose a reason for hiding this comment

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

Beautiful, thank you! 🙇

@jpbempel jpbempel merged commit b2c528a into DataDog:master Feb 11, 2020
@jpbempel jpbempel deleted the jpbempel/fixThreadFactory branch February 11, 2020 22:08
@truthbk truthbk added this to the 0.35.0 milestone Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants