package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev

# Packages

# Functions

AddAssertEntranceForLockError is used only for test.
AdviseOptimizeWithPlanAndThenWarmUp first do `AdviseOptimizeWithPlan` to optimize the txn with plan and then do `AdviseWarmup` to do some tso fetch if necessary.
AssertTxnManagerInfoSchema is used only for test.
AssertTxnManagerReadTS is used only for test.
ErrorAction returns StmtActionError with specified error.
ExecTestHook is used only for test.
NewTxn starts a new optimistic and active txn, it can be used for the below scenes: 1.
NewTxnInStmt is like `NewTxn` but it will call `OnStmtStart` after it.
NoIdea returns StmtActionNoIdea, nil.
OnStmtRetryCountInc is used only for test.
RecordAssert is used only for test.
RetryReady returns StmtActionRetryReady, nil.
TsoRequestCountInc is used only for test When it is called, there is a tso cmd request.
TsoUseConstantCountInc is used to test constant tso count.
TsoWaitCountInc is used only for test When it is called, there is a waiting tso operation.

# Constants

EnterNewTxnBeforeStmt indicates to enter a new txn before each statement when the txn is not present If `EnterNewTxnBeforeStmt` is used, the new txn will always act as the 'lazy' mode.
EnterNewTxnDefault means to enter a new txn.
EnterNewTxnWithBeginStmt indicates to enter a new txn when execute 'BEGIN' or 'START TRANSACTION'.
EnterNewTxnWithReplaceProvider indicates to replace the current provider.
StmtActionError means the error should be returned directly without any retry.
StmtActionNoIdea means the error is not caused by this component, and whether retry or not should be determined by other components.
StmtActionRetryReady means the error is caused by this component, and it is ready for retry.
StmtErrAfterPessimisticLock means we are handling an error after pessimistic lock failed.
StmtErrAfterQuery means we are handling an error after the query failed.

# Variables

AssertLockErr is used to record the lock errors we encountered Only for test.
AssertRecordsKey is used to save failPoint invoke records Only for test.
AssertTxnInfoSchemaAfterRetryKey is used to set the expected infoschema that should be check in failPoint after retry Only for test.
AssertTxnInfoSchemaKey is used to set the expected infoschema that should be check in failPoint Only for test.
BreakPointBeforeExecutorFirstRun is the key for the stop point where session stops before executor's first run Only for test.
BreakPointOnStmtRetryAfterLockError s the key for the stop point where session stops after OnStmtRetry when lock error happens Only for test.
CallOnStmtRetryCount is the key for recording calling OnStmtRetry at RC isolation level.
GetTxnManager returns the TxnManager object from session context.
TsoRequestCount is the key for recording tso request counts in some places.
TsoUseConstantCount is the key for constant tso counter.
TsoWaitCount doesn't include begin and commit.

# Structs

EnterNewTxnRequest is the request when entering a new transaction.

# Interfaces

TxnAdvisable providers a collection of optimizations within transaction.
TxnContextProvider provides txn context.
TxnManager is an interface providing txn context management in session.

# Type aliases

ConstantFuture implements oracle.Future.
EnterNewTxnType is the type to enter a new txn.
StmtErrorAction is the next action advice when an error occurs when executing a statement.
StmtErrorHandlePoint is where the error is being handled.