-
Notifications
You must be signed in to change notification settings - Fork 92
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
fix: connection leak when concurrent updates #669
Conversation
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## master #669 +/- ##
==========================================
+ Coverage 36.79% 36.81% +0.01%
==========================================
Files 204 204
Lines 22428 22724 +296
==========================================
+ Hits 8253 8366 +113
- Misses 13258 13427 +169
- Partials 917 931 +14
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
@@ -772,7 +774,7 @@ func (c *Conn) writeErrorPacket(errorCode uint16, sqlState string, format string | |||
sqlState = mysql.SSUnknownSQLState | |||
} | |||
if len(sqlState) != 5 { | |||
panic("sqlState has to be 5 characters long") | |||
panic(fmt.Sprintf("sqlState has to be 5 characters long, actual is %d!", len(sqlState))) |
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.
不能返回 error 吗?panic 不能轻易启用。
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.
返回string吧,感觉更常见些。
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
What this PR does:
Which issue(s) this PR fixes:
Fixes #639
Special notes for your reviewer:
Does this PR introduce a user-facing change?: