thunguo commented on code in PR #1171:
URL:
https://github.com/apache/incubator-seata-go/pull/1171#discussion_r4028759352
##########
pkg/rm/issue1158_repro_test.go:
##########
@@ -0,0 +1,35 @@
+/*
Review Comment:
这里是不是不需要单独一个文件?
##########
pkg/remoting/processor/client/rm_branch_commit_processor.go:
##########
@@ -71,7 +72,19 @@ func (f *rmBranchCommitProcessor) handleGrpcBranchCommit(ctx
context.Context, rp
Xid: xid,
}
- status, err :=
rm.GetRmCacheInstance().GetResourceManager(branch.BranchType(request.AbstractBranchEndRequest.BranchType)).BranchCommit(ctx,
branchResource)
+ branchType :=
branch.BranchType(request.AbstractBranchEndRequest.BranchType)
Review Comment:
在转换前check下 BranchType是不是会好一些,int32 转 int8 后 257 会变成 TCC,未知类型会绕过检查走到已经注册的
RM。可以check下 pb.BranchTypeProto(branchType) != rawType,不一致返回 Failed。rollback
路径可以同样的处理。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]