-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
feat(mysql): add pool size options for each connection #11810
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
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
commit: |
PR Code Suggestions ✨Latest suggestions up to 80236a4
Previous suggestionsSuggestions up to commit 995a4a2
Suggestions up to commit 0155f7a
Suggestions up to commit e11b7fa
|
||||||||||||||||||||||||||||||||||||
pkuczynski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we add a bit of documentation and unit test for it?
gioboa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I'll add the documentation.
idk if we can test replicas, I will check
The documentation for all the MysqlConnectionCredentialsOptions properties is missing. I think we can create another PR to achieve the documentation for these props. |
Co-authored-by: 아이작_조서환 <wtae1216@sooplive.com>
Co-authored-by: 아이작_조서환 <wtae1216@sooplive.com>
Description of change
Currently, the
MysqlConnectionOptionspoolSize option specifies the connection limit for all replica connections.In this case, you cannot specify a connection limit for each master or slave.
For example, if you only want to create one master connection and up to 10 slave connections, Typeorm has no solution.
I added the
MysqlConnectionCredentialsOptionspoolSize option, allowing you to specify a poolSize for each replica.Verification Method
If the master's poolSize is 1 and the `slaves[0] poolSize is 2,
then the master connection should be open at most 1, and the slaves[0] connection should be open at most 2.
Pull-Request Checklist
masterbranchFixes #00000Related Issues
#8799
Summary by CodeRabbit