-
Notifications
You must be signed in to change notification settings - Fork 1k
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
refactor tdengine store code, auto close resource #1513
Conversation
if (!serverAvailable) { | ||
log.error("\n\t---------------TdEngine Init Failed---------------\n" + | ||
"\t--------------Please Config Tdengine--------------\n" + | ||
"\t----------Can Not Use Metric History Now----------\n"); | ||
return instanceValuesMap; | ||
} |
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! hi,suggest put this before the connection.
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.
okay, I done the suggestion.
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.
👍
Co-authored-by: Carpe-Wang <[email protected]>
Co-authored-by: Carpe-Wang <[email protected]>
Co-authored-by: Carpe-Wang <[email protected]>
Co-authored-by: Carpe-Wang <[email protected]>
Co-authored-by: Carpe-Wang <[email protected]>
Co-authored-by: Carpe-Wang <[email protected]>
Co-authored-by: Carpe-Wang <[email protected]>
Co-authored-by: Carpe-Wang <[email protected]>
Co-authored-by: Carpe-Wang <[email protected]>
What's changed?
在解决fix #1419,发现和代码问题关系不大,就简单优化了下代码
记录所有的SQLException分别catch,然后就是把finally代码块用try-with-resources语句自动管理资源替代,目的是在出现异常时,可以更简洁地确保资源被正确关闭。
Checklist
Add or update API