Skip to content

Add client configuration overriding of SCHEDULED_EXECUTOR_SERVICE option #4002

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

Merged
merged 3 commits into from
May 19, 2023

Conversation

scrocquesel
Copy link
Contributor

Motivation and Context

Customer should be able to use their own ThreadPool and reuse it accros multiple clients.

#1690

Modifications

Introduce new client config methods to allow to override SCHEDULED_EXECUTOR_SERVICE option. It is optional and when not provided will default to the actual code that create a new ThreadPool for each clients

Testing

Unit tests ensure the override is applied on the client configuration.
I also tested in a private project by setting api call timeout to actually create new thread on the custom thread pool.

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@scrocquesel scrocquesel requested a review from a team as a code owner May 12, 2023 09:56
Copy link
Contributor

@davidh44 davidh44 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!! Looks great, we just need to make sure the custom ScheduledExecutorService doesn't get closed when the client is closed. Also a few minor comments.

@scrocquesel
Copy link
Contributor Author

Thanks for the PR!! Looks great, we just need to make sure the custom ScheduledExecutorService doesn't get closed when the client is closed. Also a few minor comments.

Should I add more commits to the PR or force pushed ?

@davidh44
Copy link
Contributor

davidh44 commented May 18, 2023

Should I add more commits to the PR or force pushed ?

You can add more commits to the PR

@scrocquesel scrocquesel requested a review from davidh44 May 18, 2023 20:40
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 14 Code Smells

88.1% 88.1% Coverage
1.2% 1.2% Duplication

@davidh44 davidh44 merged commit c7a1786 into aws:master May 19, 2023
@davidh44
Copy link
Contributor

davidh44 commented May 19, 2023

@all-contributors please add @scrocquesel for code.

@davidh44
Copy link
Contributor

@scrocquesel Great stuff! PR has been merged 👍

@scrocquesel scrocquesel deleted the custom_scheduler branch May 20, 2023 11:35
@debora-ito
Copy link
Member

Trying again :) And adding contributors from previous PRs.

@all-contributors

please add @scrocquesel for code.
please add @dave-fn for code.
please add @L-Applin for code.

@allcontributors
Copy link
Contributor

@debora-ito

I've put up a pull request to add @scrocquesel! 🎉

I've put up a pull request to add @dave-fn! 🎉

I've put up a pull request to add @L-Applin! 🎉

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