package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
NewManager creates a new concurrency Manager structure.
# Constants
OptimisticEval represents optimistic locking.
PessimisticAfterFailedOptimisticEval represents a request sequencing attempt immediately following a failed OptimisticEval.
PessimisticEval represents pessimistic locking.
# Variables
BatchPushedLockResolution controls whether the lock table should allow non-locking readers to defer and batch the resolution of conflicting locks whose holder is known to be pending and have been pushed above the reader's timestamp.
DiscoveredLocksThresholdToConsultTxnStatusCache sets a threshold as mentioned in the description string.
LockTableDeadlockOrLivenessDetectionPushDelay sets the delay before pushing in order to detect dependency cycles between transactions or coordinator failure of conflicting transactions.
MaxLockWaitQueueLength sets the maximum length of a lock wait-queue that a read-write request is willing to enter and wait in.
# Structs
Config contains the dependencies to construct a Manager.
Guard is returned from Manager.SequenceReq.
LockMetrics holds information about the state of a single lock in a lockTable.
LockTableMetrics holds information about the state of a lockTable.
QueryLockTableOptions bundles the options for the QueryLockTableState function.
QueryLockTableResumeState bundles the return metadata on the pagination of results from the QueryLockTableState function.
Request is the input to Manager.SequenceReq.
# Interfaces
ContentionHandler is concerned with handling contention-related errors.
IntentResolver is an interface used by lockTableWaiterImpl to push transactions and to resolve intents.
LockManager is concerned with tracking locks that are stored on the manager's range.
Manager is a structure that sequences incoming requests and provides isolation between requests that intend to perform conflicting operations.
MetricExporter is concerned with providing observability into the state of the concurrency manager.
RangeStateListener is concerned with observing updates to the concurrency manager's range.
RequestSequencer is concerned with the sequencing of concurrent requests.
TestingAccessor is concerned with providing testing hooks that expose the state of the concurrency manager, to be used by unit tests outside of the concurrency package.
TransactionManager is concerned with tracking transactions that have their record stored on the manager's range.
# Type aliases
Error is an alias for a kvpb.Error.
LatchMetrics holds information about the state of a latchManager.
RequestEvalKind informs the manager of the evaluation kind for the current evaluation attempt.
Response is a slice of responses to requests in a batch.
TopKLockMetrics holds the metrics on the top K (where K = 3) locks by various orderings.