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

Add LoopResources Configuration Support #232

Merged
merged 1 commit into from
Feb 14, 2024
Merged

Add LoopResources Configuration Support #232

merged 1 commit into from
Feb 14, 2024

Conversation

jchrys
Copy link
Collaborator

@jchrys jchrys commented Feb 13, 2024

Motivation:
Enhances flexibility by allowing custom LoopResources configuration for optimized event loop management.

Modifications:
Introduced LoopResources configuration option in MysqlConnectionConfiguration and updated relevant documentation.

Result:
Enables performance tuning and flexibility, improving adaptability for various deployment scenarios. Resolves #229

@jchrys jchrys added the enhancement New feature or request label Feb 13, 2024
Motivation:
Enhances flexibility by allowing custom `LoopResources` configuration for optimized event loop management.

Modifications:
Introduced `LoopResources` configuration option in `MysqlConnectionConfiguration` and updated relevant documentation.

Result:
Enables performance tuning and flexibility, improving adaptability for various deployment scenarios.
Resolves #229
Copy link
Contributor

@mirromutth mirromutth left a comment

Choose a reason for hiding this comment

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

LGTM

I have a question for this. We support LOCAL INFILE which is based on AsynchronousFileChannel. AFAIK, if we don't specify an ExecutorService, AsynchronousFileChannel will try to use the global ThreadPool by default. Should we apply the LoopResources to it?

I'm not sure because LoopResources are usually used as TCP resources, and LOCAL INFILE is not a frequently used feature.

@jchrys
Copy link
Collaborator Author

jchrys commented Feb 14, 2024

I think we are okay to LoopResources for Tcp only. since AsynchronousFileChannel is using min 0 max Integer.MAX_VALUE executor by default so each opened will have a dedicated thread.(https://github.com/openjdk/jdk/blob/8765b176f97dbf334836f0aa6acd921d114304a9/src/java.base/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java#L46)

@jchrys jchrys merged commit aff4cc5 into trunk Feb 14, 2024
12 checks passed
@jchrys jchrys deleted the 1x-loop-resources branch February 14, 2024 03:14
@jchrys jchrys added this to the 1.1.2 milestone Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] Support for Custom Loop Resources
2 participants