Browse Source

xa callback use pooled db

pull/251/head
yedf2 4 years ago
parent
commit
f9cca239ef
  1. 5
      dtmcli/dtmimp/trans_xa_base.go

5
dtmcli/dtmimp/trans_xa_base.go

@ -20,13 +20,10 @@ type XaClientBase struct {
// HandleCallback Handle the callback of commit/rollback
func (xc *XaClientBase) HandleCallback(gid string, branchID string, action string) error {
db, err := StandaloneDB(xc.Conf)
db, err := PooledDB(xc.Conf)
if err != nil {
return err
}
defer func() {
_ = db.Close()
}()
xaID := gid + "-" + branchID
_, err = DBExec(db, GetDBSpecial().GetXaSQL(action, xaID))
if err != nil &&

Loading…
Cancel
Save