txnkv

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 11 Imported by: 39

Documentation

Index

Constants

View Source
const (
	SI = txnsnapshot.SI
	RC = txnsnapshot.RC
)

IsoLevel value for transaction priority.

View Source
const (
	PriorityHigh   = txnutil.PriorityHigh
	PriorityNormal = txnutil.PriorityNormal
	PriorityLow    = txnutil.PriorityLow
)

Priority value for transaction priority.

View Source
const MaxTxnTimeUse = transaction.MaxTxnTimeUse

MaxTxnTimeUse is the max time a Txn may use (in ms) from its begin to commit. We use it to abort the transaction to guarantee GC worker will not influence it.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinlogWriteResult

type BinlogWriteResult = transaction.BinlogWriteResult

BinlogWriteResult defines the result of prewrite binlog.

type Client

type Client struct {
	*tikv.KVStore
}

Client is a txn client.

func NewClient

func NewClient(pdAddrs []string) (*Client, error)

NewClient creates a txn client with pdAddrs.

func (*Client) GetTimestamp

func (c *Client) GetTimestamp(ctx context.Context) (uint64, error)

GetTimestamp returns the current global timestamp.

type IsoLevel

type IsoLevel = txnsnapshot.IsoLevel

IsoLevel is the transaction's isolation level.

type KVFilter

type KVFilter = transaction.KVFilter

KVFilter is a filter that filters out unnecessary KV pairs.

type KVSnapshot

type KVSnapshot = txnsnapshot.KVSnapshot

KVSnapshot implements the tidbkv.Snapshot interface.

type KVTxn

type KVTxn = transaction.KVTxn

KVTxn contains methods to interact with a TiKV transaction.

type Lock

type Lock = txnlock.Lock

Lock represents a lock from tikv server.

func NewLock

func NewLock(l *kvrpcpb.LockInfo) *Lock

NewLock creates a new *Lock.

type LockResolver

type LockResolver = txnlock.LockResolver

LockResolver resolves locks and also caches resolved txn status.

type Priority

type Priority = txnutil.Priority

Priority is the priority for tikv to execute a command.

type Scanner

type Scanner = txnsnapshot.Scanner

Scanner support tikv scan

type SchemaAmender

type SchemaAmender = transaction.SchemaAmender

SchemaAmender is used by pessimistic transactions to amend commit mutations for schema change during 2pc.

type SchemaLeaseChecker

type SchemaLeaseChecker = transaction.SchemaLeaseChecker

SchemaLeaseChecker is used to validate schema version is not changed during transaction execution.

type SchemaVer

type SchemaVer = transaction.SchemaVer

SchemaVer is the infoSchema which will return the schema version.

type SnapshotRuntimeStats

type SnapshotRuntimeStats = txnsnapshot.SnapshotRuntimeStats

SnapshotRuntimeStats records the runtime stats of snapshot.

type TxnStatus

type TxnStatus = txnlock.TxnStatus

TxnStatus represents a txn's final status. It should be Lock or Commit or Rollback.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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