-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
optimize: datasource manager branch rollback exception log #1775
optimize: datasource manager branch rollback exception log #1775
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1775 +/- ##
============================================
+ Coverage 55.18% 55.3% +0.12%
Complexity 2521 2521
============================================
Files 445 446 +1
Lines 14882 14910 +28
Branches 1726 1765 +39
============================================
+ Hits 8212 8246 +34
- Misses 5883 5899 +16
+ Partials 787 765 -22
|
rm-datasource/src/main/java/io/seata/rm/datasource/DataSourceManager.java
Outdated
Show resolved
Hide resolved
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
Better than the current, but the probability of one in ten thousand is still too low.
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.
a util class is needed to centrally control such scenarios, and the frequency is made into a configuration item.
rm-datasource/src/main/java/io/seata/rm/datasource/DataSourceManager.java
Outdated
Show resolved
Hide resolved
rm-datasource/src/main/java/io/seata/rm/datasource/DataSourceManager.java
Outdated
Show resolved
Hide resolved
private static final Configuration CONFIG = ConfigurationFactory.getInstance(); | ||
|
||
public static void info(Logger logger, Throwable cause, String format1, Object[] args1, String format2, Object[] args2) { | ||
if (logger.isInfoEnabled()) { |
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.
args2=cause.getMessage?
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
Ⅰ. Describe what this PR did
update DataSourceManager.branchRollback exception log, convenience to troubleshoot problems.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews