package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev
# Functions
InitMetricsVars init transaction metrics vars.
TxnDurationHistogram returns the observer for the given state and hasLock type.
TxnStatusEnteringCounter returns the counter for the given state.
# Constants
AllSQLDigestsStr is the column name of the TIDB_TRX table's AllSQLDigests column.
CurrentSQLDigestStr is the column name of the TIDB_TRX table's CurrentSQLDigest column.
CurrentSQLDigestTextStr is the column name of the TIDB_TRX table's CurrentSQLDigestText column.
DBStr is the column name of the TIDB_TRX table's DB column.
IDStr is the column name of the TIDB_TRX table's ID column.
MemBufferBytesStr is the column name of the TIDB_TRX table's MemBufferBytes column.
MemBufferKeysStr is the column name of the TIDB_TRX table's MemBufferKeys column.
RelatedTableIDsStr is the table id of the TIDB_TRX table's RelatedTableIDs column.
SessionIDStr is the column name of the TIDB_TRX table's SessionID column.
StartTimeStr is the column name of the TIDB_TRX table's StartTime column.
StateStr is the column name of the TIDB_TRX table's State column.
TxnCommitting means`` the transaction is (at least trying to) committing.
TxnIdle means the transaction is idle, i.e.
TxnLockAcquiring means the transaction is trying to acquire a lock.
TxnRollingBack means the transaction is rolling back.
TxnRunning means the transaction is running, i.e.
TxnStateCounter is a marker of the number of states, ensuring we don't miss any of them.
UserStr is the column name of the TIDB_TRX table's User column.
WaitingStartTimeStr is the column name of the TIDB_TRX table's WaitingStartTime column.
WaitingTimeStr is the column name of the TIDB_TRX table's WaitingTime column.
# Variables
Recorder is the recorder instance.
TxnRunningStateStrs is the names of the TxnRunningStates.
# Structs
ProcessInfo is part of fields of txnInfo, which will be filled in `session` instead of `LazyTxn`.
TrxHistoryRecorder is a history recorder for transaction.
TxnInfo is information about a running transaction This is supposed to be the datasource of `TIDB_TRX` in infoschema.
# Type aliases
TxnRunningState is the current state of a transaction.