-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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: reduce the db and network request when undoLog or lockKey is empty #2409
optimize: reduce the db and network request when undoLog or lockKey is empty #2409
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2409 +/- ##
=============================================
- Coverage 51.48% 51.08% -0.41%
+ Complexity 2803 2769 -34
=============================================
Files 553 550 -3
Lines 17685 17530 -155
Branches 2088 2062 -26
=============================================
- Hits 9105 8955 -150
- Misses 7727 7733 +6
+ Partials 853 842 -11
|
…/seata into optimize_useless_register
@zjinlei PTAL,THS |
rm-datasource/src/main/java/io/seata/rm/datasource/ConnectionProxy.java
Outdated
Show resolved
Hide resolved
…/seata into optimize_useless_register
if (context.hasUndoLog()) { | ||
if (context.hasUndoLog()) { | ||
try { | ||
register(); |
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.
I think it's better to put it in registers and flushUndoLogs.
if there is no undolog why flushUndoLogs method execution without judgment
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.
I have finish it.PTAL
…/seata into optimize_useless_register
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
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
Ⅱ. Does this pull request fix one issue?
issue
optimize: unnecessary to register branch transaction when undo is empty
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews