XiaoFeiASK opened a new issue, #1165: URL: https://github.com/apache/incubator-seata-go/issues/1165
### ✅ 验证清单 - [x] 🔍 我已经搜索过 [现有 Issues](https://github.com/apache/incubator-seata-go/issues),确信这不是重复问题 - [x] 🛠️ 我愿意自己处理这个议题 ### 🚀 Go 版本 go1.26.4 ### 📦 Seata-go 版本 Seata-go 版本:v2.0.0-rc01 ### 💾 操作系统 🪟 Windows ### 📝 Bug 描述 When committing a global transaction through gRPC, the code constructs a `GlobalCommitRequestProto`, but sets its `MessageType` to `TYPE_GLOBAL_BEGIN`: ```go req := &pb.GlobalCommitRequestProto{ AbstractGlobalEndRequest: &pb.AbstractGlobalEndRequestProto{ AbstractTransactionRequest: &pb.AbstractTransactionRequestProto{ AbstractMessage: &pb.AbstractMessageProto{ MessageType: pb.MessageTypeProto_TYPE_GLOBAL_BEGIN, }, }, Xid: gtr.Xid, }, } ### 🔄 重现步骤 1.Use the gRPC transaction manager to commit a global transaction. 2.Capture the GlobalCommitRequestProto passed to SendSyncRequest. 3.Check the following field: ``` msg.(*pb.GlobalCommitRequestProto). GetAbstractGlobalEndRequest(). GetAbstractTransactionRequest(). GetAbstractMessage(). GetMessageType() ``` ### ✅ 预期行为 The expected value is: `TYPE_GLOBAL_COMMIT` ### ❌ 实际行为 The current value is: `TYPE_GLOBAL_BEGIN` ### 💡 可能的解决方案 Change: `MessageType: pb.MessageTypeProto_TYPE_GLOBAL_BEGIN,` To: `MessageType: pb.MessageTypeProto_TYPE_GLOBAL_COMMIT,` A regression test should also be added to verify the message type sent by Commit(). -- 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]
