-
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
DefaultTransactionManager.begin fix #6105
Conversation
[email protected] seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 2.x #6105 +/- ##
============================================
- Coverage 49.45% 49.41% -0.04%
+ Complexity 4811 4805 -6
============================================
Files 913 913
Lines 31678 31678
Branches 3826 3826
============================================
- Hits 15665 15653 -12
- Misses 14474 14481 +7
- Partials 1539 1544 +5
|
you have two git name in commit log |
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
@@ -51,7 +52,7 @@ public String begin(String applicationId, String transactionServiceGroup, String | |||
request.setTransactionName(name); | |||
request.setTimeout(timeout); | |||
GlobalBeginResponse response = (GlobalBeginResponse) syncCall(request); | |||
if (response.getResultCode() == ResultCode.Failed) { | |||
if (Objects.isNull(response) || response.getResultCode() == ResultCode.Failed) { |
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.
Please submit relevant npe test reports
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.
need to submit UT ?
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.
Under what circumstances will NPE occur here?
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.
问题的根因不在这里,请你把完整堆栈发出来
The root cause of the problem is not here, please send out the complete stack
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.
而且堆栈是54行,你修改的是55行,你应该提交一个issue,而不是一个pr,一个记录完整异常描述和seata版本的issue
Moreover, the stack trace is at line 54 and you made a modification at line 55. You should submit an issue instead of a pull request, which includes the complete description of the exception and the version of Seata.
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.
NPE may occur in earlier versions due to request timeout, please submit an issue as detailed in the template.
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.
ok
Ⅰ. Describe what this PR did
I find method name 'DefaultTransactionManager.begin' NPE occurred, when 'TM' or 'TR' registered failed !
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
only add one condition simply !
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews