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
It is confuse in the document #1215
Conversation
The document says |
related with #1141 |
README.md
Outdated
@@ -86,6 +86,7 @@ db.SetMaxIdleConns(10) | |||
`db.SetMaxOpenConns()` is highly recommended to limit the number of connection used by the application. There is no recommended limit number because it depends on application and MySQL server. | |||
|
|||
`db.SetMaxIdleConns()` is recommended to be set same to (or greater than) `db.SetMaxOpenConns()`. When it is smaller than `SetMaxOpenConns()`, connections can be opened and closed very frequently than you expect. Idle connections can be closed by the `db.SetConnMaxLifetime()`. If you want to close idle connections more rapidly, you can use `db.SetConnMaxIdleTime()` since Go 1.15. | |||
It's confuse here! The code shows if MaxIdleConns is large than MaxOpen, will be reduce to MaxOpen |
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.
Does this line need?
It seems that removing "(or greater than)" is enough to resolve this issue.
#1141 (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.
Yes,I will fix as that. This line is just used to open a MR
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.
Done! @shogo82148
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.
LGTM
CC: @methane
I'll merge it because you said that:
#1141 (comment)
I wrote "same to (or greater than)" because greater value become same value automatically.
If it is confusing, I'm OK to remove "(or greater than)" part.
* master: (93 commits) return unsigned in database type name when necessary (go-sql-driver#1238) add an invalid DSN test case (go-sql-driver#1235) refactoring (*textRows).readRow in a more clear way (go-sql-driver#1230) use utf8mb4 instead of utf8 in TestCharset (go-sql-driver#1228) improve readability follows go-staticcheck (go-sql-driver#1227) support Is comparison on MySQLError (go-sql-driver#1210) Wording correction in README (go-sql-driver#1218) noCopy implements sync.Locker (go-sql-driver#1216) Fix readme: MaxIdle is same or less than MaxOpen (go-sql-driver#1215) Drop support of Go 1.12 (go-sql-driver#1211) Release v1.6.0 (go-sql-driver#1197) add Go 1.16 to the build matrix (go-sql-driver#1198) Implement driver.Validator interface (go-sql-driver#1174) handling decoding pem error (go-sql-driver#1192) stop rounding times (go-sql-driver#1172) improve GitHub Actions workflows (go-sql-driver#1190) Move tests from Travis to Actions (go-sql-driver#1183) Fix go vet error (go-sql-driver#1173) README: Make usage code more friendly (go-sql-driver#1170) Fix a broken link to cleartext client side plugin (go-sql-driver#1165) ...
Description
I am confuse with the important setting. The code shows if MaxIdleConns is large than MaxOpen, will be reduce to MaxOpen
Checklist