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

Improve job pool configurations #1746

Merged
merged 2 commits into from
Nov 12, 2024
Merged

Improve job pool configurations #1746

merged 2 commits into from
Nov 12, 2024

Conversation

tylerwowen
Copy link
Contributor

@tylerwowen tylerwowen commented Nov 8, 2024

Due to misconfiguration, the job pool used in Teletraan has only one thread. Similar issue fixed in https://github.com/pinternal/rodimus/pull/110

  1. ExecutorService used for thread pool has only 1 thread. Changed the work queue type to fix. The configuration is the same as the regular pool in the Rodimus.
  2. ExecutorService instance is not managed, so it's not properly shutdown. Use Dropwizard for lifecycle management.
  3. Bind it to Micrometer's registry so we get metrics.

Considerations

I didn't have the whole change in Rodimus ported because it was not needed. There are only 3 types of tasks involved in Teletraan, ChangeFeed, NotifyJob and Webhook. They will work fine with just the regular pool configuration.

Test plan

This change is a subset of changes we made to Rodimus and it's been working well. For sanity tests, I deployed a build with this change and verified that change feed events are published and metrics are emitted.

Screenshot 2024-11-08 at 14 39 52 Screenshot 2024-11-08 at 14 39 43

@tylerwowen tylerwowen requested a review from a team as a code owner November 8, 2024 22:32
@github-actions github-actions bot added the deploy-service Includes changes to deploy-service label Nov 8, 2024
@tylerwowen tylerwowen merged commit f7b98a5 into master Nov 12, 2024
6 checks passed
@tylerwowen tylerwowen deleted the touyang/jobpool branch November 12, 2024 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-service Includes changes to deploy-service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants