Versions in this module Expand all Collapse all v7 v7.0.4 Jan 30, 2023 v7.0.2 Jan 30, 2023 v7.0.1 Jan 30, 2023 v7.0.0 Jan 30, 2023 Changes in this version + const LockUserMetaDeleteByte + const LockUserMetaNoneByte + const ShortValueMaxLen + var LockUserMetaDelete = []byte + var LockUserMetaNone = []byte + func DecodeExtraTxnStatusKey(extraKey []byte) (key []byte) + func DecodeKeyTS(buf []byte) uint64 + func EncodeExtraTxnStatusKey(key []byte, startTS uint64) []byte + func EncodeLockCFValue(lock *Lock) ([]byte, []byte) + func EncodeWriteCFValue(t WriteType, startTs uint64, shortVal []byte) []byte + type DBBundle struct + DB *badger.DB + LockStore *lockstore.MemStore + MemStoreMu sync.Mutex + StateTS uint64 + type DBSnapshot struct + LockStore *lockstore.MemStore + Txn *badger.Txn + func NewDBSnapshot(db *DBBundle) *DBSnapshot + type DBUserMeta []byte + func NewDBUserMeta(startTS, commitTS uint64) DBUserMeta + func (m DBUserMeta) CommitTS() uint64 + func (m DBUserMeta) StartTS() uint64 + type DBWriter interface + Close func() + DeleteRange func(start, end []byte, latchHandle LatchHandle) error + NewWriteBatch func(startTS, commitTS uint64, ctx *kvrpcpb.Context) WriteBatch + Open func() + Write func(batch WriteBatch) error + type LatchHandle interface + AcquireLatches func(hashVals []uint64) + ReleaseLatches func(hashVals []uint64) + type Lock struct + Primary []byte + Secondaries [][]byte + Value []byte + func DecodeLock(data []byte) (l Lock) + func ParseLockCFValue(data []byte) (lock Lock, err error) + func (l *Lock) MarshalBinary() []byte + func (l *Lock) ToLockInfo(key []byte) *kvrpcpb.LockInfo + type LockHdr struct + ForUpdateTS uint64 + HasOldVer bool + MinCommitTS uint64 + Op uint8 + PrimaryLen uint16 + SecondaryNum uint32 + StartTS uint64 + TTL uint32 + UseAsyncCommit bool + type LockType = byte + const LockTypeDelete + const LockTypeLock + const LockTypePessimistic + const LockTypePut + type WriteBatch interface + Commit func(key []byte, lock *Lock) + PessimisticLock func(key []byte, lock *Lock) + PessimisticRollback func(key []byte) + Prewrite func(key []byte, lock *Lock) + Rollback func(key []byte, deleleLock bool) + type WriteCFValue struct + ShortVal []byte + StartTS uint64 + Type WriteType + func ParseWriteCFValue(data []byte) (wv WriteCFValue, err error) + type WriteType = byte + const WriteTypeDelete + const WriteTypeLock + const WriteTypePut + const WriteTypeRollback