-
Notifications
You must be signed in to change notification settings - Fork 271
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
feat: XA connect manager #433
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #433 +/- ##
==========================================
- Coverage 40.59% 39.32% -1.28%
==========================================
Files 139 143 +4
Lines 8749 9063 +314
==========================================
+ Hits 3552 3564 +12
- Misses 4908 5205 +297
- Partials 289 294 +5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
"time" | ||
|
||
"github.com/seata/seata-go/pkg/datasource/sql/types" | ||
"github.com/seata/seata-go/pkg/protocol/branch" |
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.
顺序弄反了吧
"github.com/seata/seata-go/pkg/datasource/sql/datasource" | ||
"github.com/seata/seata-go/pkg/datasource/sql/exec" | ||
"github.com/seata/seata-go/pkg/protocol/branch" | ||
"github.com/seata/seata-go/pkg/protocol/message" |
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.
format
var rootContext sql.RootContext | ||
transactionTimeout, ok := rootContext.GetTimeout() | ||
if !ok { | ||
transactionTimeout = int(60000) |
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.
这里弄成常量吧
|
||
func (c *ConnectionProxyXA) releaseIfNecessary() { | ||
if c.ShouldBeHeld() { | ||
if reflect.DeepEqual(c.xaBranchXid, XABranchXid{}) { |
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.
这里没必要这么写吧,直接判断null吧
func (c *ConnectionProxyXA) XaRollbackByBranchId(xid string, branchId int64, applicationData string) { | ||
xaXid := Build(xid, branchId) | ||
c.XaRollback(xaXid) | ||
} |
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.
缺了点单测
* xa connect manager
What this PR does:
Which issue(s) this PR fixes:
Fixes #344
Special notes for your reviewer:
Does this PR introduce a user-facing change?: