Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
smiletrl committed Mar 17, 2024
1 parent f5ae7fe commit 87d5d40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/datasource/sql/conn_xa.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func (c *XAConn) createNewTxOnExecIfNeed(ctx context.Context, f func() (types.Ex
ret, err := f()

// When c.xaActive is false, i.e, when cleanXABranchContext() has been called, it means
// this xa transaction has been terminated(db conn closed)/rollbacked/commited). No need to proceed anymore.
// this xa transaction has been terminated(db conn closed)/rollbacked/committed). No need to proceed anymore.
// This could be introduced by a concurrent timeout check located at
// pkg/database/sql/xa_resource_manager.go, xaTwoPhaseTimeoutChecker() and
// probably other similar async scenarios.
Expand Down Expand Up @@ -395,7 +395,7 @@ func (c *XAConn) CloseForce() error {
}

func (c *XAConn) XaCommit(ctx context.Context, xaXid XAXid) error {
// xa tx has been either terminated(db conn closed)/rollbacked/commited already
// xa tx has been either terminated(db conn closed)/rollbacked/committed already
if !c.xaActive {
return nil
}
Expand All @@ -405,15 +405,15 @@ func (c *XAConn) XaCommit(ctx context.Context, xaXid XAXid) error {
}

func (c *XAConn) XaRollbackByBranchId(ctx context.Context, xaXid XAXid) error {
// xa tx has been either terminated(db conn closed)/rollbacked/commited already
// xa tx has been either terminated(db conn closed)/rollbacked/committed already
if !c.xaActive {
return nil
}
return c.XaRollback(ctx, xaXid)
}

func (c *XAConn) XaRollback(ctx context.Context, xaXid XAXid) error {
// xa tx has been either terminated(db conn closed)/rollbacked/commited already
// xa tx has been either terminated(db conn closed)/rollbacked/committed already
if !c.xaActive {
return nil
}
Expand Down

0 comments on commit 87d5d40

Please sign in to comment.