We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
请问这种场景应该怎么使用呀?需要根据条件再开启一个事务。如果这么调用内部会调用2次 tx.Commit()
` barrier, err := dtmgrpc.BarrierFromGrpc(ctx) if err != nil { return nil, err } tx := db.Begin() sourceTx := tx.Statement.ConnPool.(*sql.Tx) return &emptypb.Empty{}, barrier.Call(sourceTx, func(_ *sql.Tx) error { return ( tx *gorm.DB)error{ if condition { msg:= dtmgrpc.NewMsgGrpc(host, gid) msg.Add(...) err := msg.DoAndSubmit(QueryPrepare, func(bb *dtmcli.BranchBarrier) error { return bb.Call(sourceTx, func(tx *sql.Tx) error { return nil }) }) }}() }) }`
The text was updated successfully, but these errors were encountered:
这个看不太清晰,最后能够把业务描述清楚,代码里面最好能把业务代码用函数调用代表,并加上说明
Sorry, something went wrong.
No branches or pull requests
请问这种场景应该怎么使用呀?需要根据条件再开启一个事务。如果这么调用内部会调用2次 tx.Commit()
The text was updated successfully, but these errors were encountered: