Skip to content

Commit

Permalink
executor: add lock time in total time of insert execution info (#52211)
Browse files Browse the repository at this point in the history
close #52174
  • Loading branch information
jackysp committed Mar 30, 2024
1 parent 208df64 commit 2cc964d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/executor/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,9 @@ func (a *ExecStmt) handlePessimisticDML(ctx context.Context, e exec.Executor) (e
startLocking := time.Now()
err = txn.LockKeys(ctx, lockCtx, keys...)
a.phaseLockDurations[0] += time.Since(startLocking)
if e.RuntimeStats() != nil {
e.RuntimeStats().Record(time.Since(startLocking), 0)
}
if lockKeyStats != nil {
seVars.StmtCtx.MergeLockKeysExecDetails(lockKeyStats)
}
Expand Down

0 comments on commit 2cc964d

Please sign in to comment.