It is confuse in the document#1215
It is confuse in the document#1215shogo82148 merged 1 commit intogo-sql-driver:masterfrom lowang-bh:master
Conversation
|
The document says |
|
related with #1141 |
README.md
Outdated
| `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.
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.
Yes,I will fix as that. This line is just used to open a MR
shogo82148
left a comment
There was a problem hiding this comment.
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.
Description
I am confuse with the important setting. The code shows if MaxIdleConns is large than MaxOpen, will be reduce to MaxOpen
Checklist