package
2.1.0-rc.2+incompatible
Repository: https://github.com/coderushing/tidb.git
Documentation: pkg.go.dev

# Functions

BackOff Implements exponential backoff with full jitter.
BatchGetValues gets values in batch.
GetInt64 get int64 value which created by IncInt64 method.
IncInt64 increases the value for key k in kv store by step.
IsErrNotFound checks if err is a kind of NotFound error.
IsRetryableError checks if the err is a fatal error and the under going operation is worth to retry.
NewBufferStore creates a BufferStore using r for read.
NewInjectedStore creates a InjectedStore with config.
NewMemDbBuffer creates a new memDbBuffer.
NewMockStorage creates a new mockStorage.
NewMockTxn new a mockTxn.
NewUnionIter returns a union iterator for BufferStore.
NewUnionStore builds a new UnionStore.
NewVariables create a new Variables instance with default values.
NewVersion creates a new Version struct.
NextUntil applies FnKeyCmp to each entry of the iterator until meets some condition.
RunInNewTxn will run the f in a new transaction environment.
WalkMemBuffer iterates all buffered kv pairs in memBuf.

# Constants

BinlogInfo contains the binlog data and client.
BypassLatch option tells 2PC commit to bypass latches, it would be true when the transaction is not conflict-retryable, for example: 'select for update', 'load data'.
Default values.
IsolationLevel sets isolation level for current transaction.
KeyOnly retrieve only keys, it can be used in scan now.
NotFillCache makes this request do not touch the LRU cache of the underlying storage.
PresumeKeyNotExists indicates that when dealing with a Get operation but failing to read data from cache, we presume that the key does not exist in Store.
PresumeKeyNotExistsError is the option key for error.
Priority marks the priority of this transaction.
Priority value for transaction priority.
Priority value for transaction priority.
Priority value for transaction priority.
RC stands for 'read committed'.
ReqTypes.
ReqTypes.
ReqTypes.
ReqTypes.
ReqTypes.
ReqTypes.
ReqTypes.
ReqTypes.
ReqTypes.
ReqTypes.
ReqTypes.
ReqTypes.
SchemaChecker is used for checking schema-validity.
SI stands for 'snapshot isolation'.
Skip existing check when "prewrite".
SyncLog decides whether the WAL(write-ahead log) of this request should be synchronized.

# Variables

DefaultTxnMembufCap is the default transaction membuf capability.
DefaultVars is the default variables instance.
ErrCannotSetNilValue is the error when sets an empty value.
ErrClosed is used when close an already closed txn.
ErrConditionNotMatch is used when condition is not met.
ErrEntryTooLarge is the error when a key value entry is too large.
ErrInvalidTxn is the error when commits or rollbacks in an invalid transaction.
ErrKeyExists returns when key is already exist.
ErrLazyConditionPairsNotMatch is used when value in store differs from expect pairs.
ErrLockConflict is used when try to lock an already locked key.
ErrNotCommitted is the error returned by CommitVersion when this transaction is not committed.
ErrNotExist is used when try to get an entry with an unexist key from KV store.
ErrNotImplemented returns when a function is not implemented yet.
ErrRetryable is used when KV store occurs RPC error or some other errors which SQL layer can safely retry.
ErrTxnTooLarge is the error when transaction is too large, lock time reached the maximum value.
ImportingTxnMembufCap is the capability of tidb importing data situation.
MaxVersion is the maximum version, notice that it's not a valid version.
MinVersion is the minimum version, it's not a valid version, too.
TempTxnMemBufCap is the capability of temporary membuf.
TxnEntryCountLimit is limit of number of entries in the MemBuffer.
TxnEntrySizeLimit is limit of single entry size (len(key) + len(value)).
TxnTotalSizeLimit is limit of the sum of all entry size.

# Structs

BufferStore wraps a Retriever for read and a MemBuffer for buffered write.
InjectedSnapshot wraps a Snapshot with injections.
InjectedStore wraps a Storage with injections.
InjectedTransaction wraps a Transaction with injections.
InjectionConfig is used for fault injections for KV components.
KeyRange represents a range where StartKey <= key < EndKey.
Request represents a kv request.
UnionIter is the iterator on an UnionStore.
Variables defines the variables used by KV storage.
Version is the wrapper of KV's version.

# Interfaces

Client is used to send request to KV layer.
Driver is the interface that must be implemented by a KV storage.
Iterator is the interface for a iterator on KV store.
MemBuffer is an in-memory kv collection, can be used to buffer write operations.
MockTxn is used for test cases that need more interfaces than Transaction.
Mutator is the interface wraps the basic Set and Delete methods.
Options is an interface of a set of options.
Response represents the response returned from KV layer.
ResultSubset represents a result subset from a single storage unit.
Retriever is the interface wraps the basic Get and Seek methods.
RetrieverMutator is the interface that groups Retriever and Mutator interfaces.
Snapshot defines the interface for the snapshot fetched from KV store.
Storage defines the interface for storage.
Transaction defines the interface for operations inside a Transaction.
UnionStore is a store that wraps a snapshot for read and a BufferStore for buffered write.
VersionProvider provides increasing IDs.

# Type aliases

ContextKey is the type of context's key.
EncodedKey represents encoded key in low-level storage engine.
FnKeyCmp is the function for iterator the keys.
IsoLevel is the transaction's isolation level.
Key represents high-level Key type.
Option is used for customizing kv store's behaviors during a transaction.