Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LockNoWait = int64(-1)
LockNoWait is used for pessimistic lock wait time these two constants are special for lock protocol with tikv -1 means nowait, others meaning lock wait in milliseconds
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager represents a waiters manager.
func (*Manager) WakeUpForDeadlock ¶
func (lw *Manager) WakeUpForDeadlock(resp *deadlock.DeadlockResponse)
WakeUpForDeadlock wakes up waiters waiting for deadlock detection results
type WaitResult ¶
type WaitResult struct { DeadlockResp *deadlock.DeadlockResponse // WakeupSleepTime, -1 means the wait is already timeout, 0 means the lock will be granted to this waiter // others are the wake-up-delay-duration sleep time, in milliseconds WakeupSleepTime WakeupWaitTime CommitTS uint64 }
WaitResult represents a wait result.
type Waiter ¶
type Waiter struct { LockTS uint64 KeyHash uint64 CommitTs uint64 // contains filtered or unexported fields }
Waiter represents a waiter.
func (*Waiter) Wait ¶
func (w *Waiter) Wait() WaitResult
Wait waits on a lock until waked by others or timeout.
type WakeupWaitTime ¶
type WakeupWaitTime int
WakeupWaitTime is the implementation of variable "wake-up-delay-duration"
const ( WaitTimeout WakeupWaitTime = -1 WakeUpThisWaiter WakeupWaitTime = 0 WakeupDelayTimeout WakeupWaitTime = 1 )
WakeupWaitTime
Click to show internal directories.
Click to hide internal directories.