Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LockAlwaysWait = int64(0) LockNoWait = int64(-1) )
Used for pessimistic lock wait time these two constants are special for lock protocol with tikv 0 means always wait, -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
}
func NewManager ¶
func (*Manager) WakeUpForDeadlock ¶
func (lw *Manager) WakeUpForDeadlock(resp *deadlock.DeadlockResponse)
WakeUpDetection wakes up waiters waiting for deadlock detection results
type WaitResult ¶
type WaitResult struct { // 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 DeadlockResp *deadlock.DeadlockResponse }
type Waiter ¶
type Waiter struct { LockTS uint64 KeyHash uint64 CommitTs uint64 // contains filtered or unexported fields }
func (*Waiter) Wait ¶
func (w *Waiter) Wait() WaitResult
type WakeupWaitTime ¶
type WakeupWaitTime int
WakeupWaitTime is the implementation of variable "wake-up-delay-duration"
const WaitTimeout WakeupWaitTime = -1
const WakeUpThisWaiter WakeupWaitTime = 0
const WakeupDelayTimeout WakeupWaitTime = 1
Click to show internal directories.
Click to hide internal directories.