Browse Source

Merge pull request #388 from zj-kenzhou/main

修复xa grpc 事务无法携带header 等信息的问题
pull/391/head
yedf2 3 years ago
committed by GitHub
parent
commit
5d0dfba1e5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      client/dtmgrpc/xa.go

5
client/dtmgrpc/xa.go

@ -79,10 +79,7 @@ func XaGlobalTransaction2(server string, gid string, custom func(*XaGrpc), xaFun
xa := &XaGrpc{TransBase: *dtmimp.NewTransBase(gid, "xa", server, "")}
custom(xa)
dc := dtmgimp.MustGetDtmClient(xa.Dtm)
req := &dtmgpb.DtmRequest{
Gid: gid,
TransType: xa.TransType,
}
req := dtmgimp.GetDtmRequest(&xa.TransBase)
return dtmimp.XaHandleGlobalTrans(&xa.TransBase, func(action string) error {
f := map[string]func(context.Context, *dtmgpb.DtmRequest, ...grpc.CallOption) (*emptypb.Empty, error){
"prepare": dc.Prepare,

Loading…
Cancel
Save