deadlock

package
v2.0.0-...-5317c89 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

type Detector struct {
	// contains filtered or unexported fields
}

Detector detects deadlock.

func NewDetector

func NewDetector() *Detector

NewDetector creates a new Detector.

func (*Detector) CleanUp

func (d *Detector) CleanUp(txn uint64)

CleanUp removes the wait for entry for the transaction.

func (*Detector) CleanUpWaitFor

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

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

func (*Detector) Detect

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

Detect detects deadlock for the sourceTxn on a locked key.

func (*Detector) Expire

func (d *Detector) Expire(minTS uint64)

Expire removes entries with TS smaller than minTS.

type ErrDeadlock

type ErrDeadlock struct {
	KeyHash uint64
}

ErrDeadlock is returned when deadlock is detected.

func (*ErrDeadlock) Error

func (e *ErrDeadlock) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL