-
Notifications
You must be signed in to change notification settings - Fork 81
automatic reconnect with retry after connection closed #37
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
base: 5.0-mysql-support-opt-2.1
Are you sure you want to change the base?
automatic reconnect with retry after connection closed #37
Conversation
|
@jackysp PTAL |
| throws SQLException | ||
| { | ||
| dbConn.rollback(); | ||
| dbConn.rollback(); |
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.
格式调一下
src/client/jTPCCTerminal.java
Outdated
| } | ||
| catch (SQLException | CommunicationException e ){ | ||
| try { | ||
| retryConnect(); |
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.
没有保护全下面还有类似场景
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.
判断一下错误原因,如果是关闭再重连
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.

benchmarkSQL throw an exception after any connection close, which will cause quit. Add automatic reconnect with retry to benchmarkSQL, which will automatically reconnect after connection close or tidb-server crash.