tidb: github.com/pingcap/tidb/util/deadlock Index | Files

package deadlock

import "github.com/pingcap/tidb/util/deadlock"


Package Files


type Detector Uses

type Detector struct {
    // contains filtered or unexported fields

Detector detects deadlock.

func NewDetector Uses

func NewDetector() *Detector

NewDetector creates a new Detector.

func (*Detector) CleanUp Uses

func (d *Detector) CleanUp(txn uint64)

CleanUp removes the wait for entry for the transaction.

func (*Detector) CleanUpWaitFor Uses

func (d *Detector) CleanUpWaitFor(txn, waitForTxn, keyHash uint64)

CleanUpWaitFor removes a key in the wait for entry for the transaction.

func (*Detector) Detect Uses

func (d *Detector) Detect(sourceTxn, waitForTxn, keyHash uint64) *ErrDeadlock

Detect detects deadlock for the sourceTxn on a locked key.

func (*Detector) Expire Uses

func (d *Detector) Expire(minTS uint64)

Expire removes entries with TS smaller than minTS.

type ErrDeadlock Uses

type ErrDeadlock struct {
    KeyHash uint64

ErrDeadlock is returned when deadlock is detected.

func (*ErrDeadlock) Error Uses

func (e *ErrDeadlock) Error() string

Package deadlock imports 2 packages (graph) and is imported by 5 packages. Updated 2019-07-27. Refresh now. Tools for package owners.