Repository navigation
feat(mysql): add pool size options for each connection - #11810
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.
Shall we add a bit of documentation and unit test for it?
gioboa
left a comment
There was a problem hiding this comment.
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: 아이작_조서환 <[email protected]>
Co-authored-by: 아이작_조서환 <[email protected]>
Allow master and slave connections to specify individual poolSize, matching the existing MySQL driver behavior (PR typeorm#11810). Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-authored-by: 아이작_조서환 <[email protected]>
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