kvrpcpb

package
Version: v0.0.0-...-ca78592 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 10 Imported by: 1,022

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthKvrpcpb        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowKvrpcpb          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupKvrpcpb = fmt.Errorf("proto: unexpected end of group")
)
View Source
var APIVersion_name = map[int32]string{
	0: "V1",
	1: "V1TTL",
	2: "V2",
}
View Source
var APIVersion_value = map[string]int32{
	"V1":    0,
	"V1TTL": 1,
	"V2":    2,
}
View Source
var Action_name = map[int32]string{
	0: "NoAction",
	1: "TTLExpireRollback",
	2: "LockNotExistRollback",
	3: "MinCommitTSPushed",
	4: "TTLExpirePessimisticRollback",
	5: "LockNotExistDoNothing",
}
View Source
var Action_value = map[string]int32{
	"NoAction":                     0,
	"TTLExpireRollback":            1,
	"LockNotExistRollback":         2,
	"MinCommitTSPushed":            3,
	"TTLExpirePessimisticRollback": 4,
	"LockNotExistDoNothing":        5,
}
View Source
var AssertionLevel_name = map[int32]string{
	0: "Off",
	1: "Fast",
	2: "Strict",
}
View Source
var AssertionLevel_value = map[string]int32{
	"Off":    0,
	"Fast":   1,
	"Strict": 2,
}
View Source
var Assertion_name = map[int32]string{
	0: "None",
	1: "Exist",
	2: "NotExist",
}
View Source
var Assertion_value = map[string]int32{
	"None":     0,
	"Exist":    1,
	"NotExist": 2,
}
View Source
var ChecksumAlgorithm_name = map[int32]string{
	0: "Crc64_Xor",
}
View Source
var ChecksumAlgorithm_value = map[string]int32{
	"Crc64_Xor": 0,
}
View Source
var CommandPri_name = map[int32]string{
	0: "Normal",
	1: "Low",
	2: "High",
}
View Source
var CommandPri_value = map[string]int32{
	"Normal": 0,
	"Low":    1,
	"High":   2,
}
View Source
var DiskFullOpt_name = map[int32]string{
	0: "NotAllowedOnFull",
	1: "AllowedOnAlmostFull",
	2: "AllowedOnAlreadyFull",
}
View Source
var DiskFullOpt_value = map[string]int32{
	"NotAllowedOnFull":     0,
	"AllowedOnAlmostFull":  1,
	"AllowedOnAlreadyFull": 2,
}
View Source
var ExtraOp_name = map[int32]string{
	0: "Noop",
	1: "ReadOldValue",
}
View Source
var ExtraOp_value = map[string]int32{
	"Noop":         0,
	"ReadOldValue": 1,
}
View Source
var IsolationLevel_name = map[int32]string{
	0: "SI",
	1: "RC",
	2: "RCCheckTS",
}
View Source
var IsolationLevel_value = map[string]int32{
	"SI":        0,
	"RC":        1,
	"RCCheckTS": 2,
}
View Source
var Op_name = map[int32]string{
	0: "Put",
	1: "Del",
	2: "Lock",
	3: "Rollback",
	4: "Insert",
	5: "PessimisticLock",
	6: "CheckNotExists",
}
View Source
var Op_value = map[string]int32{
	"Put":             0,
	"Del":             1,
	"Lock":            2,
	"Rollback":        3,
	"Insert":          4,
	"PessimisticLock": 5,
	"CheckNotExists":  6,
}
View Source
var PessimisticLockKeyResultType_name = map[int32]string{
	0: "LockResultNormal",
	1: "LockResultLockedWithConflict",
	2: "LockResultFailed",
}
View Source
var PessimisticLockKeyResultType_value = map[string]int32{
	"LockResultNormal":             0,
	"LockResultLockedWithConflict": 1,
	"LockResultFailed":             2,
}
View Source
var PessimisticLockWakeUpMode_name = map[int32]string{
	0: "WakeUpModeNormal",
	1: "WakeUpModeForceLock",
}
View Source
var PessimisticLockWakeUpMode_value = map[string]int32{
	"WakeUpModeNormal":    0,
	"WakeUpModeForceLock": 1,
}
View Source
var PrewriteRequest_PessimisticAction_name = map[int32]string{
	0: "SKIP_PESSIMISTIC_CHECK",
	1: "DO_PESSIMISTIC_CHECK",
	2: "DO_CONSTRAINT_CHECK",
}
View Source
var PrewriteRequest_PessimisticAction_value = map[string]int32{
	"SKIP_PESSIMISTIC_CHECK": 0,
	"DO_PESSIMISTIC_CHECK":   1,
	"DO_CONSTRAINT_CHECK":    2,
}
View Source
var WriteConflict_Reason_name = map[int32]string{
	0: "Unknown",
	1: "Optimistic",
	2: "PessimisticRetry",
	3: "SelfRolledBack",
	4: "RcCheckTs",
	5: "LazyUniquenessCheck",
}
View Source
var WriteConflict_Reason_value = map[string]int32{
	"Unknown":             0,
	"Optimistic":          1,
	"PessimisticRetry":    2,
	"SelfRolledBack":      3,
	"RcCheckTs":           4,
	"LazyUniquenessCheck": 5,
}

Functions

This section is empty.

Types

type APIVersion

type APIVersion int32

The API version the server and the client is using. See more details in https://github.com/tikv/rfcs/blob/master/text/0069-api-v2.md.

const (
	// `V1` is mainly for TiDB & TxnKV, and is not safe to use RawKV along with the others.
	// V1 server only accepts V1 requests. V1 raw requests with TTL will be rejected.
	APIVersion_V1 APIVersion = 0
	//
	// `V1TTL` is only available to RawKV, and 8 bytes representing the unix timestamp in
	// seconds for expiring time will be append to the value of all RawKV entries. For example:
	// ------------------------------------------------------------
	// | User value     | Expire Ts                               |
	// ------------------------------------------------------------
	// | 0x12 0x34 0x56 | 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0xff |
	// ------------------------------------------------------------
	// V1TTL server only accepts V1 raw requests.
	// V1 client should not use `V1TTL` in request. V1 client should always send `V1`.
	APIVersion_V1TTL APIVersion = 1
	//
	// `V2` use new encoding for RawKV & TxnKV to support more features.
	//
	// Key Encoding:
	//  TiDB: start with `m` or `t`, the same as `V1`.
	//  TxnKV: prefix with `x`, encoded as `MCE( x{keyspace id} + {user key} ) + timestamp`.
	//  RawKV: prefix with `r`, encoded as `MCE( r{keyspace id} + {user key} ) + timestamp`.
	//  Where the `{keyspace id}` is fixed-length of 3 bytes in network byte order.
	//  Besides, RawKV entires must be in `default` CF.
	//
	// Value Encoding:
	//  TiDB & TxnKV: the same as `V1`.
	//  RawKV: `{user value} + {optional fields} + {meta flag}`. The last byte in the
	//  raw value must be meta flags. For example:
	//  --------------------------------------
	//  | User value     | Meta flags        |
	//  --------------------------------------
	//  | 0x12 0x34 0x56 | 0x00 (0b00000000) |
	//  --------------------------------------
	//  Bit 0 of meta flags is for TTL. If set, the value contains 8 bytes expiring time as
	//  unix timestamp in seconds at the very left to the meta flags.
	//  --------------------------------------------------------------------------------
	//  | User value     | Expiring time                           | Meta flags        |
	//  --------------------------------------------------------------------------------
	//  | 0x12 0x34 0x56 | 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0xff | 0x01 (0b00000001) |
	//  --------------------------------------------------------------------------------
	//  Bit 1 is for deletion. If set, the entry is logical deleted.
	//  ---------------------
	//  | Meta flags        |
	//  ---------------------
	//  | 0x02 (0b00000010) |
	//  ---------------------
	//
	// V2 server accpets V2 requests and V1 transactional requests that statrts with TiDB key
	// prefix (`m` and `t`).
	APIVersion_V2 APIVersion = 2
)

func (APIVersion) EnumDescriptor

func (APIVersion) EnumDescriptor() ([]byte, []int)

func (APIVersion) String

func (x APIVersion) String() string

type Action

type Action int32
const (
	Action_NoAction                     Action = 0
	Action_TTLExpireRollback            Action = 1
	Action_LockNotExistRollback         Action = 2
	Action_MinCommitTSPushed            Action = 3
	Action_TTLExpirePessimisticRollback Action = 4
	Action_LockNotExistDoNothing        Action = 5
)

func (Action) EnumDescriptor

func (Action) EnumDescriptor() ([]byte, []int)

func (Action) String

func (x Action) String() string

type AlreadyExist

type AlreadyExist struct {
	Key                  []byte   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AlreadyExist) Descriptor

func (*AlreadyExist) Descriptor() ([]byte, []int)

func (*AlreadyExist) GetKey

func (m *AlreadyExist) GetKey() []byte

func (*AlreadyExist) Marshal

func (m *AlreadyExist) Marshal() (dAtA []byte, err error)

func (*AlreadyExist) MarshalTo

func (m *AlreadyExist) MarshalTo(dAtA []byte) (int, error)

func (*AlreadyExist) MarshalToSizedBuffer

func (m *AlreadyExist) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AlreadyExist) ProtoMessage

func (*AlreadyExist) ProtoMessage()

func (*AlreadyExist) Reset

func (m *AlreadyExist) Reset()

func (*AlreadyExist) Size

func (m *AlreadyExist) Size() (n int)

func (*AlreadyExist) String

func (m *AlreadyExist) String() string

func (*AlreadyExist) Unmarshal

func (m *AlreadyExist) Unmarshal(dAtA []byte) error

func (*AlreadyExist) XXX_DiscardUnknown

func (m *AlreadyExist) XXX_DiscardUnknown()

func (*AlreadyExist) XXX_Marshal

func (m *AlreadyExist) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AlreadyExist) XXX_Merge

func (m *AlreadyExist) XXX_Merge(src proto.Message)

func (*AlreadyExist) XXX_Size

func (m *AlreadyExist) XXX_Size() int

func (*AlreadyExist) XXX_Unmarshal

func (m *AlreadyExist) XXX_Unmarshal(b []byte) error

type Assertion

type Assertion int32
const (
	Assertion_None     Assertion = 0
	Assertion_Exist    Assertion = 1
	Assertion_NotExist Assertion = 2
)

func (Assertion) EnumDescriptor

func (Assertion) EnumDescriptor() ([]byte, []int)

func (Assertion) String

func (x Assertion) String() string

type AssertionFailed

type AssertionFailed struct {
	StartTs              uint64    `protobuf:"varint,1,opt,name=start_ts,json=startTs,proto3" json:"start_ts,omitempty"`
	Key                  []byte    `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Assertion            Assertion `protobuf:"varint,3,opt,name=assertion,proto3,enum=kvrpcpb.Assertion" json:"assertion,omitempty"`
	ExistingStartTs      uint64    `protobuf:"varint,4,opt,name=existing_start_ts,json=existingStartTs,proto3" json:"existing_start_ts,omitempty"`
	ExistingCommitTs     uint64    `protobuf:"varint,5,opt,name=existing_commit_ts,json=existingCommitTs,proto3" json:"existing_commit_ts,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*AssertionFailed) Descriptor

func (*AssertionFailed) Descriptor() ([]byte, []int)

func (*AssertionFailed) GetAssertion

func (m *AssertionFailed) GetAssertion() Assertion

func (*AssertionFailed) GetExistingCommitTs

func (m *AssertionFailed) GetExistingCommitTs() uint64

func (*AssertionFailed) GetExistingStartTs

func (m *AssertionFailed) GetExistingStartTs() uint64

func (*AssertionFailed) GetKey

func (m *AssertionFailed) GetKey() []byte

func (*AssertionFailed)