Documentation ¶
Index ¶
- Constants
- Variables
- func RequestsDebugString(requests []TxnRequest, withPayload bool) string
- func ResponsesDebugString(responses []TxnResponse) string
- func ValidTxnIsolation(value string) bool
- func ValidTxnMode(value string) bool
- type CNOpRequest
- func (m CNOpRequest) DebugString() string
- func (*CNOpRequest) Descriptor() ([]byte, []int)
- func (m *CNOpRequest) GetOpCode() uint32
- func (m *CNOpRequest) GetPayload() []byte
- func (m *CNOpRequest) GetTarget() metadata.DNShard
- func (m *CNOpRequest) Marshal() (dAtA []byte, err error)
- func (m *CNOpRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *CNOpRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CNOpRequest) ProtoMessage()
- func (m *CNOpRequest) Reset()
- func (m *CNOpRequest) Size() (n int)
- func (m *CNOpRequest) String() string
- func (m *CNOpRequest) Unmarshal(dAtA []byte) error
- func (m *CNOpRequest) XXX_DiscardUnknown()
- func (m *CNOpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CNOpRequest) XXX_Merge(src proto.Message)
- func (m *CNOpRequest) XXX_Size() int
- func (m *CNOpRequest) XXX_Unmarshal(b []byte) error
- type CNOpResponse
- func (m CNOpResponse) DebugString() string
- func (*CNOpResponse) Descriptor() ([]byte, []int)
- func (m *CNOpResponse) GetPayload() []byte
- func (m *CNOpResponse) Marshal() (dAtA []byte, err error)
- func (m *CNOpResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *CNOpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CNOpResponse) ProtoMessage()
- func (m *CNOpResponse) Reset()
- func (m *CNOpResponse) Size() (n int)
- func (m *CNOpResponse) String() string
- func (m *CNOpResponse) Unmarshal(dAtA []byte) error
- func (m *CNOpResponse) XXX_DiscardUnknown()
- func (m *CNOpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CNOpResponse) XXX_Merge(src proto.Message)
- func (m *CNOpResponse) XXX_Size() int
- func (m *CNOpResponse) XXX_Unmarshal(b []byte) error
- type CNTxnSnapshot
- func (*CNTxnSnapshot) Descriptor() ([]byte, []int)
- func (m *CNTxnSnapshot) GetDisable1PCOpt() bool
- func (m *CNTxnSnapshot) GetEnableCacheWrite() bool
- func (m *CNTxnSnapshot) GetLockTables() []lock.LockTable
- func (m *CNTxnSnapshot) GetReadyOnly() bool
- func (m *CNTxnSnapshot) GetTxn() TxnMeta
- func (m *CNTxnSnapshot) Marshal() (dAtA []byte, err error)
- func (m *CNTxnSnapshot) MarshalTo(dAtA []byte) (int, error)
- func (m *CNTxnSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CNTxnSnapshot) ProtoMessage()
- func (m *CNTxnSnapshot) Reset()
- func (m *CNTxnSnapshot) Size() (n int)
- func (m *CNTxnSnapshot) String() string
- func (m *CNTxnSnapshot) Unmarshal(dAtA []byte) error
- func (m *CNTxnSnapshot) XXX_DiscardUnknown()
- func (m *CNTxnSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CNTxnSnapshot) XXX_Merge(src proto.Message)
- func (m *CNTxnSnapshot) XXX_Size() int
- func (m *CNTxnSnapshot) XXX_Unmarshal(b []byte) error
- type TxnCommitDNShardRequest
- func (*TxnCommitDNShardRequest) Descriptor() ([]byte, []int)
- func (m *TxnCommitDNShardRequest) GetDNShard() metadata.DNShard
- func (m *TxnCommitDNShardRequest) Marshal() (dAtA []byte, err error)
- func (m *TxnCommitDNShardRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnCommitDNShardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnCommitDNShardRequest) ProtoMessage()
- func (m *TxnCommitDNShardRequest) Reset()
- func (m *TxnCommitDNShardRequest) Size() (n int)
- func (m *TxnCommitDNShardRequest) String() string
- func (m *TxnCommitDNShardRequest) Unmarshal(dAtA []byte) error
- func (m *TxnCommitDNShardRequest) XXX_DiscardUnknown()
- func (m *TxnCommitDNShardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnCommitDNShardRequest) XXX_Merge(src proto.Message)
- func (m *TxnCommitDNShardRequest) XXX_Size() int
- func (m *TxnCommitDNShardRequest) XXX_Unmarshal(b []byte) error
- type TxnCommitDNShardResponse
- func (*TxnCommitDNShardResponse) Descriptor() ([]byte, []int)
- func (m *TxnCommitDNShardResponse) Marshal() (dAtA []byte, err error)
- func (m *TxnCommitDNShardResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnCommitDNShardResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnCommitDNShardResponse) ProtoMessage()
- func (m *TxnCommitDNShardResponse) Reset()
- func (m *TxnCommitDNShardResponse) Size() (n int)
- func (m *TxnCommitDNShardResponse) String() string
- func (m *TxnCommitDNShardResponse) Unmarshal(dAtA []byte) error
- func (m *TxnCommitDNShardResponse) XXX_DiscardUnknown()
- func (m *TxnCommitDNShardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnCommitDNShardResponse) XXX_Merge(src proto.Message)
- func (m *TxnCommitDNShardResponse) XXX_Size() int
- func (m *TxnCommitDNShardResponse) XXX_Unmarshal(b []byte) error
- type TxnCommitRequest
- func (*TxnCommitRequest) Descriptor() ([]byte, []int)
- func (m *TxnCommitRequest) GetDisable1PCOpt() bool
- func (m *TxnCommitRequest) Marshal() (dAtA []byte, err error)
- func (m *TxnCommitRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnCommitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnCommitRequest) ProtoMessage()
- func (m *TxnCommitRequest) Reset()
- func (m *TxnCommitRequest) Size() (n int)
- func (m *TxnCommitRequest) String() string
- func (m *TxnCommitRequest) Unmarshal(dAtA []byte) error
- func (m *TxnCommitRequest) XXX_DiscardUnknown()
- func (m *TxnCommitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnCommitRequest) XXX_Merge(src proto.Message)
- func (m *TxnCommitRequest) XXX_Size() int
- func (m *TxnCommitRequest) XXX_Unmarshal(b []byte) error
- type TxnCommitResponse
- func (*TxnCommitResponse) Descriptor() ([]byte, []int)
- func (m *TxnCommitResponse) Marshal() (dAtA []byte, err error)
- func (m *TxnCommitResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnCommitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnCommitResponse) ProtoMessage()
- func (m *TxnCommitResponse) Reset()
- func (m *TxnCommitResponse) Size() (n int)
- func (m *TxnCommitResponse) String() string
- func (m *TxnCommitResponse) Unmarshal(dAtA []byte) error
- func (m *TxnCommitResponse) XXX_DiscardUnknown()
- func (m *TxnCommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnCommitResponse) XXX_Merge(src proto.Message)
- func (m *TxnCommitResponse) XXX_Size() int
- func (m *TxnCommitResponse) XXX_Unmarshal(b []byte) error
- type TxnError
- func (m TxnError) DebugString() string
- func (*TxnError) Descriptor() ([]byte, []int)
- func (m *TxnError) GetCode() uint32
- func (m *TxnError) GetError() []byte
- func (m *TxnError) GetTxnErrCode() uint32
- func (m *TxnError) Marshal() (dAtA []byte, err error)
- func (m *TxnError) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnError) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnError) ProtoMessage()
- func (m *TxnError) Reset()
- func (m *TxnError) Size() (n int)
- func (m *TxnError) String() string
- func (m *TxnError) Unmarshal(dAtA []byte) error
- func (m TxnError) UnwrapError() error
- func (m *TxnError) XXX_DiscardUnknown()
- func (m *TxnError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnError) XXX_Merge(src proto.Message)
- func (m *TxnError) XXX_Size() int
- func (m *TxnError) XXX_Unmarshal(b []byte) error
- type TxnGetStatusRequest
- func (*TxnGetStatusRequest) Descriptor() ([]byte, []int)
- func (m *TxnGetStatusRequest) GetDNShard() metadata.DNShard
- func (m *TxnGetStatusRequest) Marshal() (dAtA []byte, err error)
- func (m *TxnGetStatusRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnGetStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnGetStatusRequest) ProtoMessage()
- func (m *TxnGetStatusRequest) Reset()
- func (m *TxnGetStatusRequest) Size() (n int)
- func (m *TxnGetStatusRequest) String() string
- func (m *TxnGetStatusRequest) Unmarshal(dAtA []byte) error
- func (m *TxnGetStatusRequest) XXX_DiscardUnknown()
- func (m *TxnGetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnGetStatusRequest) XXX_Merge(src proto.Message)
- func (m *TxnGetStatusRequest) XXX_Size() int
- func (m *TxnGetStatusRequest) XXX_Unmarshal(b []byte) error
- type TxnGetStatusResponse
- func (*TxnGetStatusResponse) Descriptor() ([]byte, []int)
- func (m *TxnGetStatusResponse) Marshal() (dAtA []byte, err error)
- func (m *TxnGetStatusResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnGetStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnGetStatusResponse) ProtoMessage()
- func (m *TxnGetStatusResponse) Reset()
- func (m *TxnGetStatusResponse) Size() (n int)
- func (m *TxnGetStatusResponse) String() string
- func (m *TxnGetStatusResponse) Unmarshal(dAtA []byte) error
- func (m *TxnGetStatusResponse) XXX_DiscardUnknown()
- func (m *TxnGetStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnGetStatusResponse) XXX_Merge(src proto.Message)
- func (m *TxnGetStatusResponse) XXX_Size() int
- func (m *TxnGetStatusResponse) XXX_Unmarshal(b []byte) error
- type TxnIsolation
- type TxnMeta
- func (m TxnMeta) DebugString() string
- func (*TxnMeta) Descriptor() ([]byte, []int)
- func (m *TxnMeta) GetCommitTS() timestamp.Timestamp
- func (m *TxnMeta) GetDNShards() []metadata.DNShard
- func (m *TxnMeta) GetID() []byte
- func (m *TxnMeta) GetIsolation() TxnIsolation
- func (m *TxnMeta) GetLockService() string
- func (m *TxnMeta) GetLockTables() []lock.LockTable
- func (m *TxnMeta) GetMirror() bool
- func (m *TxnMeta) GetMode() TxnMode
- func (m *TxnMeta) GetPreparedTS() timestamp.Timestamp
- func (m *TxnMeta) GetSnapshotTS() timestamp.Timestamp
- func (m *TxnMeta) GetStatus() TxnStatus
- func (m TxnMeta) IsPessimistic() bool
- func (m TxnMeta) IsRCIsolation() bool
- func (m *TxnMeta) Marshal() (dAtA []byte, err error)
- func (m *TxnMeta) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnMeta) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnMeta) ProtoMessage()
- func (m *TxnMeta) Reset()
- func (m *TxnMeta) Size() (n int)
- func (m *TxnMeta) String() string
- func (m *TxnMeta) Unmarshal(dAtA []byte) error
- func (m *TxnMeta) XXX_DiscardUnknown()
- func (m *TxnMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnMeta) XXX_Merge(src proto.Message)
- func (m *TxnMeta) XXX_Size() int
- func (m *TxnMeta) XXX_Unmarshal(b []byte) error
- type TxnMethod
- type TxnMode
- type TxnPrepareRequest
- func (*TxnPrepareRequest) Descriptor() ([]byte, []int)
- func (m *TxnPrepareRequest) GetDNShard() metadata.DNShard
- func (m *TxnPrepareRequest) Marshal() (dAtA []byte, err error)
- func (m *TxnPrepareRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnPrepareRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnPrepareRequest) ProtoMessage()
- func (m *TxnPrepareRequest) Reset()
- func (m *TxnPrepareRequest) Size() (n int)
- func (m *TxnPrepareRequest) String() string
- func (m *TxnPrepareRequest) Unmarshal(dAtA []byte) error
- func (m *TxnPrepareRequest) XXX_DiscardUnknown()
- func (m *TxnPrepareRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnPrepareRequest) XXX_Merge(src proto.Message)
- func (m *TxnPrepareRequest) XXX_Size() int
- func (m *TxnPrepareRequest) XXX_Unmarshal(b []byte) error
- type TxnPrepareResponse
- func (*TxnPrepareResponse) Descriptor() ([]byte, []int)
- func (m *TxnPrepareResponse) Marshal() (dAtA []byte, err error)
- func (m *TxnPrepareResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnPrepareResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnPrepareResponse) ProtoMessage()
- func (m *TxnPrepareResponse) Reset()
- func (m *TxnPrepareResponse) Size() (n int)
- func (m *TxnPrepareResponse) String() string
- func (m *TxnPrepareResponse) Unmarshal(dAtA []byte) error
- func (m *TxnPrepareResponse) XXX_DiscardUnknown()
- func (m *TxnPrepareResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnPrepareResponse) XXX_Merge(src proto.Message)
- func (m *TxnPrepareResponse) XXX_Size() int
- func (m *TxnPrepareResponse) XXX_Unmarshal(b []byte) error
- type TxnRemoveMetadataRequest
- func (*TxnRemoveMetadataRequest) Descriptor() ([]byte, []int)
- func (m *TxnRemoveMetadataRequest) GetDNShard() metadata.DNShard
- func (m *TxnRemoveMetadataRequest) Marshal() (dAtA []byte, err error)
- func (m *TxnRemoveMetadataRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnRemoveMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnRemoveMetadataRequest) ProtoMessage()
- func (m *TxnRemoveMetadataRequest) Reset()
- func (m *TxnRemoveMetadataRequest) Size() (n int)
- func (m *TxnRemoveMetadataRequest) String() string
- func (m *TxnRemoveMetadataRequest) Unmarshal(dAtA []byte) error
- func (m *TxnRemoveMetadataRequest) XXX_DiscardUnknown()
- func (m *TxnRemoveMetadataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnRemoveMetadataRequest) XXX_Merge(src proto.Message)
- func (m *TxnRemoveMetadataRequest) XXX_Size() int
- func (m *TxnRemoveMetadataRequest) XXX_Unmarshal(b []byte) error
- type TxnRemoveMetadataResponse
- func (*TxnRemoveMetadataResponse) Descriptor() ([]byte, []int)
- func (m *TxnRemoveMetadataResponse) Marshal() (dAtA []byte, err error)
- func (m *TxnRemoveMetadataResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnRemoveMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnRemoveMetadataResponse) ProtoMessage()
- func (m *TxnRemoveMetadataResponse) Reset()
- func (m *TxnRemoveMetadataResponse) Size() (n int)
- func (m *TxnRemoveMetadataResponse) String() string
- func (m *TxnRemoveMetadataResponse) Unmarshal(dAtA []byte) error
- func (m *TxnRemoveMetadataResponse) XXX_DiscardUnknown()
- func (m *TxnRemoveMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnRemoveMetadataResponse) XXX_Merge(src proto.Message)
- func (m *TxnRemoveMetadataResponse) XXX_Size() int
- func (m *TxnRemoveMetadataResponse) XXX_Unmarshal(b []byte) error
- type TxnRequest
- func (m TxnRequest) DebugString() string
- func (m TxnRequest) DebugStringWithPayload(withPayload bool) string
- func (*TxnRequest) Descriptor() ([]byte, []int)
- func (m *TxnRequest) GetCNRequest() *CNOpRequest
- func (m *TxnRequest) GetCommitDNShardRequest() *TxnCommitDNShardRequest
- func (m *TxnRequest) GetCommitRequest() *TxnCommitRequest
- func (m *TxnRequest) GetFlag() uint32
- func (m *TxnRequest) GetGetStatusRequest() *TxnGetStatusRequest
- func (m *TxnRequest) GetID() uint64
- func (m *TxnRequest) GetMethod() TxnMethod
- func (m *TxnRequest) GetOptions() *TxnRequestOptions
- func (m *TxnRequest) GetPrepareRequest() *TxnPrepareRequest
- func (m *TxnRequest) GetRemoveMetadata() *TxnRemoveMetadataRequest
- func (m *TxnRequest) GetRequestID() uint64
- func (m *TxnRequest) GetRollbackDNShardRequest() *TxnRollbackDNShardRequest
- func (m *TxnRequest) GetRollbackRequest() *TxnRollbackRequest
- func (m TxnRequest) GetTargetDN() metadata.DNShard
- func (m *TxnRequest) GetTxn() TxnMeta
- func (m *TxnRequest) Marshal() (dAtA []byte, err error)
- func (m *TxnRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnRequest) ProtoMessage()
- func (m *TxnRequest) Reset()
- func (m *TxnRequest) SetID(id uint64)
- func (m *TxnRequest) Size() (n int)
- func (m *TxnRequest) String() string
- func (m *TxnRequest) Unmarshal(dAtA []byte) error
- func (m *TxnRequest) XXX_DiscardUnknown()
- func (m *TxnRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnRequest) XXX_Merge(src proto.Message)
- func (m *TxnRequest) XXX_Size() int
- func (m *TxnRequest) XXX_Unmarshal(b []byte) error
- type TxnRequestOptions
- func (*TxnRequestOptions) Descriptor() ([]byte, []int)
- func (m *TxnRequestOptions) GetRetryCodes() []int32
- func (m *TxnRequestOptions) GetRetryInterval() int64
- func (m *TxnRequestOptions) Marshal() (dAtA []byte, err error)
- func (m *TxnRequestOptions) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnRequestOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnRequestOptions) ProtoMessage()
- func (m *TxnRequestOptions) Reset()
- func (m *TxnRequestOptions) Size() (n int)
- func (m *TxnRequestOptions) String() string
- func (m *TxnRequestOptions) Unmarshal(dAtA []byte) error
- func (m *TxnRequestOptions) XXX_DiscardUnknown()
- func (m *TxnRequestOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnRequestOptions) XXX_Merge(src proto.Message)
- func (m *TxnRequestOptions) XXX_Size() int
- func (m *TxnRequestOptions) XXX_Unmarshal(b []byte) error
- type TxnResponse
- func (m TxnResponse) DebugString() string
- func (*TxnResponse) Descriptor() ([]byte, []int)
- func (m *TxnResponse) GetCNOpResponse() *CNOpResponse
- func (m *TxnResponse) GetCommitDNShardResponse() *TxnCommitDNShardResponse
- func (m *TxnResponse) GetCommitResponse() *TxnCommitResponse
- func (m *TxnResponse) GetFlag() uint32
- func (m *TxnResponse) GetGetStatusResponse() *TxnGetStatusResponse
- func (m *TxnResponse) GetID() uint64
- func (m *TxnResponse) GetMethod() TxnMethod
- func (m *TxnResponse) GetPrepareResponse() *TxnPrepareResponse
- func (m *TxnResponse) GetRemoveMetadata() *TxnRemoveMetadataResponse
- func (m *TxnResponse) GetRequestID() uint64
- func (m *TxnResponse) GetRollbackDNShardResponse() *TxnRollbackDNShardResponse
- func (m *TxnResponse) GetRollbackResponse() *TxnRollbackResponse
- func (m *TxnResponse) GetTxn() *TxnMeta
- func (m *TxnResponse) GetTxnError() *TxnError
- func (m TxnResponse) HasFlag(flag uint32) bool
- func (m *TxnResponse) Marshal() (dAtA []byte, err error)
- func (m *TxnResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnResponse) ProtoMessage()
- func (m *TxnResponse) Reset()
- func (m *TxnResponse) SetID(id uint64)
- func (m *TxnResponse) Size() (n int)
- func (m *TxnResponse) String() string
- func (m *TxnResponse) Unmarshal(dAtA []byte) error
- func (m *TxnResponse) XXX_DiscardUnknown()
- func (m *TxnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnResponse) XXX_Merge(src proto.Message)
- func (m *TxnResponse) XXX_Size() int
- func (m *TxnResponse) XXX_Unmarshal(b []byte) error
- type TxnRollbackDNShardRequest
- func (*TxnRollbackDNShardRequest) Descriptor() ([]byte, []int)
- func (m *TxnRollbackDNShardRequest) GetDNShard() metadata.DNShard
- func (m *TxnRollbackDNShardRequest) Marshal() (dAtA []byte, err error)
- func (m *TxnRollbackDNShardRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnRollbackDNShardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnRollbackDNShardRequest) ProtoMessage()
- func (m *TxnRollbackDNShardRequest) Reset()
- func (m *TxnRollbackDNShardRequest) Size() (n int)
- func (m *TxnRollbackDNShardRequest) String() string
- func (m *TxnRollbackDNShardRequest) Unmarshal(dAtA []byte) error
- func (m *TxnRollbackDNShardRequest) XXX_DiscardUnknown()
- func (m *TxnRollbackDNShardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnRollbackDNShardRequest) XXX_Merge(src proto.Message)
- func (m *TxnRollbackDNShardRequest) XXX_Size() int
- func (m *TxnRollbackDNShardRequest) XXX_Unmarshal(b []byte) error
- type TxnRollbackDNShardResponse
- func (*TxnRollbackDNShardResponse) Descriptor() ([]byte, []int)
- func (m *TxnRollbackDNShardResponse) Marshal() (dAtA []byte, err error)
- func (m *TxnRollbackDNShardResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnRollbackDNShardResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnRollbackDNShardResponse) ProtoMessage()
- func (m *TxnRollbackDNShardResponse) Reset()
- func (m *TxnRollbackDNShardResponse) Size() (n int)
- func (m *TxnRollbackDNShardResponse) String() string
- func (m *TxnRollbackDNShardResponse) Unmarshal(dAtA []byte) error
- func (m *TxnRollbackDNShardResponse) XXX_DiscardUnknown()
- func (m *TxnRollbackDNShardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnRollbackDNShardResponse) XXX_Merge(src proto.Message)
- func (m *TxnRollbackDNShardResponse) XXX_Size() int
- func (m *TxnRollbackDNShardResponse) XXX_Unmarshal(b []byte) error
- type TxnRollbackRequest
- func (*TxnRollbackRequest) Descriptor() ([]byte, []int)
- func (m *TxnRollbackRequest) Marshal() (dAtA []byte, err error)
- func (m *TxnRollbackRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnRollbackRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnRollbackRequest) ProtoMessage()
- func (m *TxnRollbackRequest) Reset()
- func (m *TxnRollbackRequest) Size() (n int)
- func (m *TxnRollbackRequest) String() string
- func (m *TxnRollbackRequest) Unmarshal(dAtA []byte) error
- func (m *TxnRollbackRequest) XXX_DiscardUnknown()
- func (m *TxnRollbackRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnRollbackRequest) XXX_Merge(src proto.Message)
- func (m *TxnRollbackRequest) XXX_Size() int
- func (m *TxnRollbackRequest) XXX_Unmarshal(b []byte) error
- type TxnRollbackResponse
- func (*TxnRollbackResponse) Descriptor() ([]byte, []int)
- func (m *TxnRollbackResponse) Marshal() (dAtA []byte, err error)
- func (m *TxnRollbackResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *TxnRollbackResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxnRollbackResponse) ProtoMessage()
- func (m *TxnRollbackResponse) Reset()
- func (m *TxnRollbackResponse) Size() (n int)
- func (m *TxnRollbackResponse) String() string
- func (m *TxnRollbackResponse) Unmarshal(dAtA []byte) error
- func (m *TxnRollbackResponse) XXX_DiscardUnknown()
- func (m *TxnRollbackResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxnRollbackResponse) XXX_Merge(src proto.Message)
- func (m *TxnRollbackResponse) XXX_Size() int
- func (m *TxnRollbackResponse) XXX_Unmarshal(b []byte) error
- type TxnStatus
Constants ¶
const ( // SkipResponseFlag skip response. SkipResponseFlag uint32 = 1 )
Variables ¶
var ( ErrInvalidLengthTxn = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTxn = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTxn = fmt.Errorf("proto: unexpected end of group") )
var TxnIsolation_name = map[int32]string{
0: "SI",
1: "RC",
}
var TxnIsolation_value = map[string]int32{
"SI": 0,
"RC": 1,
}
var TxnMethod_name = map[int32]string{
0: "Read",
1: "Write",
2: "Commit",
3: "Rollback",
4: "Prepare",
5: "GetStatus",
6: "CommitDNShard",
7: "RollbackDNShard",
8: "RemoveMedata",
9: "DEBUG",
}
var TxnMethod_value = map[string]int32{
"Read": 0,
"Write": 1,
"Commit": 2,
"Rollback": 3,
"Prepare": 4,
"GetStatus": 5,
"CommitDNShard": 6,
"RollbackDNShard": 7,
"RemoveMedata": 8,
"DEBUG": 9,
}
var TxnMode_name = map[int32]string{
0: "Optimistic",
1: "Pessimistic",
}
var TxnMode_value = map[string]int32{
"Optimistic": 0,
"Pessimistic": 1,
}
var TxnStatus_name = map[int32]string{
0: "Active",
1: "Prepared",
2: "Committing",
3: "Committed",
4: "Aborting",
5: "Aborted",
}
var TxnStatus_value = map[string]int32{
"Active": 0,
"Prepared": 1,
"Committing": 2,
"Committed": 3,
"Aborting": 4,
"Aborted": 5,
}
Functions ¶
func RequestsDebugString ¶ added in v0.6.0
func RequestsDebugString(requests []TxnRequest, withPayload bool) string
RequestsDebugString returns requests debug string
func ResponsesDebugString ¶ added in v0.6.0
func ResponsesDebugString(responses []TxnResponse) string
ResponsesDebugString returns responses debug string
func ValidTxnIsolation ¶ added in v0.8.0
ValidTxnIsolation valid txn isolation
func ValidTxnMode ¶ added in v0.8.0
ValidTxnMode valid txn mode
Types ¶
type CNOpRequest ¶
type CNOpRequest struct { // OpCode request operation type OpCode uint32 `protobuf:"varint,1,opt,name=OpCode,proto3" json:"OpCode,omitempty"` // Payload the content of the request, TxnClient does not perceive the exact // format and content Payload []byte `protobuf:"bytes,2,opt,name=Payload,proto3" json:"Payload,omitempty"` // Target target to which the request was sent Target metadata.DNShard `protobuf:"bytes,3,opt,name=Target,proto3" json:"Target"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
CNOpRequest cn read/write request, CN -> DN. If data is written to more than one DN (>1) in a single transaction, then the transaction becomes a 2pc transaction.
func (CNOpRequest) DebugString ¶
func (m CNOpRequest) DebugString() string
DebugString returns debug string
func (*CNOpRequest) Descriptor ¶
func (*CNOpRequest) Descriptor() ([]byte, []int)
func (*CNOpRequest) GetOpCode ¶
func (m *CNOpRequest) GetOpCode() uint32
func (*CNOpRequest) GetPayload ¶
func (m *CNOpRequest) GetPayload() []byte
func (*CNOpRequest) GetTarget ¶
func (m *CNOpRequest) GetTarget() metadata.DNShard
func (*CNOpRequest) Marshal ¶
func (m *CNOpRequest) Marshal() (dAtA []byte, err error)
func (*CNOpRequest) MarshalToSizedBuffer ¶
func (m *CNOpRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CNOpRequest) ProtoMessage ¶
func (*CNOpRequest) ProtoMessage()
func (*CNOpRequest) Reset ¶
func (m *CNOpRequest) Reset()
func (*CNOpRequest) Size ¶
func (m *CNOpRequest) Size() (n int)
func (*CNOpRequest) String ¶
func (m *CNOpRequest) String() string
func (*CNOpRequest) Unmarshal ¶
func (m *CNOpRequest) Unmarshal(dAtA []byte) error
func (*CNOpRequest) XXX_DiscardUnknown ¶
func (m *CNOpRequest) XXX_DiscardUnknown()
func (*CNOpRequest) XXX_Marshal ¶
func (m *CNOpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CNOpRequest) XXX_Merge ¶
func (m *CNOpRequest) XXX_Merge(src proto.Message)
func (*CNOpRequest) XXX_Size ¶
func (m *CNOpRequest) XXX_Size() int
func (*CNOpRequest) XXX_Unmarshal ¶
func (m *CNOpRequest) XXX_Unmarshal(b []byte) error
type CNOpResponse ¶
type CNOpResponse struct { // Payload response payload Payload []byte `protobuf:"bytes,1,opt,name=Payload,proto3" json:"Payload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
CNOpResponse cn read/write response, DN -> CN. A request corresponds to a response.
func GetCNOpResponse ¶
func GetCNOpResponse(response TxnResponse) CNOpResponse
GetCNOpResponse returns the CNOpResponse from TxnResponse
func (CNOpResponse) DebugString ¶
func (m CNOpResponse) DebugString() string
DebugString returns debug string
func (*CNOpResponse) Descriptor ¶
func (*CNOpResponse) Descriptor() ([]byte, []int)
func (*CNOpResponse) GetPayload ¶
func (m *CNOpResponse) GetPayload() []byte
func (*CNOpResponse) Marshal ¶
func (m *CNOpResponse) Marshal() (dAtA []byte, err error)
func (*CNOpResponse) MarshalToSizedBuffer ¶
func (m *CNOpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CNOpResponse) ProtoMessage ¶
func (*CNOpResponse) ProtoMessage()
func (*CNOpResponse) Reset ¶
func (m *CNOpResponse) Reset()
func (*CNOpResponse) Size ¶
func (m *CNOpResponse) Size() (n int)
func (*CNOpResponse) String ¶
func (m *CNOpResponse) String() string
func (*CNOpResponse) Unmarshal ¶
func (m *CNOpResponse) Unmarshal(dAtA []byte) error
func (*CNOpResponse) XXX_DiscardUnknown ¶
func (m *CNOpResponse) XXX_DiscardUnknown()
func (*CNOpResponse) XXX_Marshal ¶
func (m *CNOpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CNOpResponse) XXX_Merge ¶
func (m *CNOpResponse) XXX_Merge(src proto.Message)
func (*CNOpResponse) XXX_Size ¶
func (m *CNOpResponse) XXX_Size() int
func (*CNOpResponse) XXX_Unmarshal ¶
func (m *CNOpResponse) XXX_Unmarshal(b []byte) error
type CNTxnSnapshot ¶
type CNTxnSnapshot struct { // ID txn id Txn TxnMeta `protobuf:"bytes,1,opt,name=Txn,proto3" json:"Txn"` // ReadyOnly txn options ReadyOnly bool `protobuf:"varint,2,opt,name=ReadyOnly,proto3" json:"ReadyOnly,omitempty"` // EnableCacheWrite txn options EnableCacheWrite bool `protobuf:"varint,3,opt,name=EnableCacheWrite,proto3" json:"EnableCacheWrite,omitempty"` // Disable1PCOpt txn options Disable1PCOpt bool `protobuf:"varint,4,opt,name=Disable1PCOpt,proto3" json:"Disable1PCOpt,omitempty"` LockTables []lock.LockTable `protobuf:"bytes,5,rep,name=LockTables,proto3" json:"LockTables"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
CNTxnSnapshot snapshot of the cn txn operation.
func (*CNTxnSnapshot) Descriptor ¶
func (*CNTxnSnapshot) Descriptor() ([]byte, []int)
func (*CNTxnSnapshot) GetDisable1PCOpt ¶
func (m *CNTxnSnapshot) GetDisable1PCOpt() bool
func (*CNTxnSnapshot) GetEnableCacheWrite ¶
func (m *CNTxnSnapshot) GetEnableCacheWrite() bool
func (*CNTxnSnapshot) GetLockTables ¶ added in v0.8.0
func (m *CNTxnSnapshot) GetLockTables() []lock.LockTable
func (*CNTxnSnapshot) GetReadyOnly ¶
func (m *CNTxnSnapshot) GetReadyOnly() bool
func (*CNTxnSnapshot) GetTxn ¶
func (m *CNTxnSnapshot) GetTxn() TxnMeta
func (*CNTxnSnapshot) Marshal ¶
func (m *CNTxnSnapshot) Marshal() (dAtA []byte, err error)
func (*CNTxnSnapshot) MarshalToSizedBuffer ¶
func (m *CNTxnSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CNTxnSnapshot) ProtoMessage ¶
func (*CNTxnSnapshot) ProtoMessage()
func (*CNTxnSnapshot) Reset ¶
func (m *CNTxnSnapshot) Reset()
func (*CNTxnSnapshot) Size ¶
func (m *CNTxnSnapshot) Size() (n int)
func (*CNTxnSnapshot) String ¶
func (m *CNTxnSnapshot) String() string
func (*CNTxnSnapshot) Unmarshal ¶
func (m *CNTxnSnapshot) Unmarshal(dAtA []byte) error
func (*CNTxnSnapshot) XXX_DiscardUnknown ¶
func (m *CNTxnSnapshot) XXX_DiscardUnknown()
func (*CNTxnSnapshot) XXX_Marshal ¶
func (m *CNTxnSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CNTxnSnapshot) XXX_Merge ¶
func (m *CNTxnSnapshot) XXX_Merge(src proto.Message)
func (*CNTxnSnapshot) XXX_Size ¶
func (m *CNTxnSnapshot) XXX_Size() int
func (*CNTxnSnapshot) XXX_Unmarshal ¶
func (m *CNTxnSnapshot) XXX_Unmarshal(b []byte) error
type TxnCommitDNShardRequest ¶
type TxnCommitDNShardRequest struct { // DNShard target DN DNShard metadata.DNShard `protobuf:"bytes,1,opt,name=DNShard,proto3" json:"DNShard"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnCommitDNShardRequest commit txn on DNShard. Data needs to be written to the LogService.
func (*TxnCommitDNShardRequest) Descriptor ¶
func (*TxnCommitDNShardRequest) Descriptor() ([]byte, []int)
func (*TxnCommitDNShardRequest) GetDNShard ¶
func (m *TxnCommitDNShardRequest) GetDNShard() metadata.DNShard
func (*TxnCommitDNShardRequest) Marshal ¶
func (m *TxnCommitDNShardRequest) Marshal() (dAtA []byte, err error)
func (*TxnCommitDNShardRequest) MarshalTo ¶
func (m *TxnCommitDNShardRequest) MarshalTo(dAtA []byte) (int, error)
func (*TxnCommitDNShardRequest) MarshalToSizedBuffer ¶
func (m *TxnCommitDNShardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnCommitDNShardRequest) ProtoMessage ¶
func (*TxnCommitDNShardRequest) ProtoMessage()
func (*TxnCommitDNShardRequest) Reset ¶
func (m *TxnCommitDNShardRequest) Reset()
func (*TxnCommitDNShardRequest) Size ¶
func (m *TxnCommitDNShardRequest) Size() (n int)
func (*TxnCommitDNShardRequest) String ¶
func (m *TxnCommitDNShardRequest) String() string
func (*TxnCommitDNShardRequest) Unmarshal ¶
func (m *TxnCommitDNShardRequest) Unmarshal(dAtA []byte) error
func (*TxnCommitDNShardRequest) XXX_DiscardUnknown ¶
func (m *TxnCommitDNShardRequest) XXX_DiscardUnknown()
func (*TxnCommitDNShardRequest) XXX_Marshal ¶
func (m *TxnCommitDNShardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnCommitDNShardRequest) XXX_Merge ¶
func (m *TxnCommitDNShardRequest) XXX_Merge(src proto.Message)
func (*TxnCommitDNShardRequest) XXX_Size ¶
func (m *TxnCommitDNShardRequest) XXX_Size() int
func (*TxnCommitDNShardRequest) XXX_Unmarshal ¶
func (m *TxnCommitDNShardRequest) XXX_Unmarshal(b []byte) error
type TxnCommitDNShardResponse ¶
type TxnCommitDNShardResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnCommitDNShardResponse response of TxnCommitDNShardRequest
func (*TxnCommitDNShardResponse) Descriptor ¶
func (*TxnCommitDNShardResponse) Descriptor() ([]byte, []int)
func (*TxnCommitDNShardResponse) Marshal ¶
func (m *TxnCommitDNShardResponse) Marshal() (dAtA []byte, err error)
func (*TxnCommitDNShardResponse) MarshalTo ¶
func (m *TxnCommitDNShardResponse) MarshalTo(dAtA []byte) (int, error)
func (*TxnCommitDNShardResponse) MarshalToSizedBuffer ¶
func (m *TxnCommitDNShardResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnCommitDNShardResponse) ProtoMessage ¶
func (*TxnCommitDNShardResponse) ProtoMessage()
func (*TxnCommitDNShardResponse) Reset ¶
func (m *TxnCommitDNShardResponse) Reset()
func (*TxnCommitDNShardResponse) Size ¶
func (m *TxnCommitDNShardResponse) Size() (n int)
func (*TxnCommitDNShardResponse) String ¶
func (m *TxnCommitDNShardResponse) String() string
func (*TxnCommitDNShardResponse) Unmarshal ¶
func (m *TxnCommitDNShardResponse) Unmarshal(dAtA []byte) error
func (*TxnCommitDNShardResponse) XXX_DiscardUnknown ¶
func (m *TxnCommitDNShardResponse) XXX_DiscardUnknown()
func (*TxnCommitDNShardResponse) XXX_Marshal ¶
func (m *TxnCommitDNShardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnCommitDNShardResponse) XXX_Merge ¶
func (m *TxnCommitDNShardResponse) XXX_Merge(src proto.Message)
func (*TxnCommitDNShardResponse) XXX_Size ¶
func (m *TxnCommitDNShardResponse) XXX_Size() int
func (*TxnCommitDNShardResponse) XXX_Unmarshal ¶
func (m *TxnCommitDNShardResponse) XXX_Unmarshal(b []byte) error
type TxnCommitRequest ¶
type TxnCommitRequest struct { Disable1PCOpt bool `protobuf:"varint,2,opt,name=Disable1PCOpt,proto3" json:"Disable1PCOpt,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnCommitRequest CN sent the commit request to coordinator DN.
func (*TxnCommitRequest) Descriptor ¶
func (*TxnCommitRequest) Descriptor() ([]byte, []int)
func (*TxnCommitRequest) GetDisable1PCOpt ¶
func (m *TxnCommitRequest) GetDisable1PCOpt() bool
func (*TxnCommitRequest) Marshal ¶
func (m *TxnCommitRequest) Marshal() (dAtA []byte, err error)
func (*TxnCommitRequest) MarshalToSizedBuffer ¶
func (m *TxnCommitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnCommitRequest) ProtoMessage ¶
func (*TxnCommitRequest) ProtoMessage()
func (*TxnCommitRequest) Reset ¶
func (m *TxnCommitRequest) Reset()
func (*TxnCommitRequest) Size ¶
func (m *TxnCommitRequest) Size() (n int)
func (*TxnCommitRequest) String ¶
func (m *TxnCommitRequest) String() string
func (*TxnCommitRequest) Unmarshal ¶
func (m *TxnCommitRequest) Unmarshal(dAtA []byte) error
func (*TxnCommitRequest) XXX_DiscardUnknown ¶
func (m *TxnCommitRequest) XXX_DiscardUnknown()
func (*TxnCommitRequest) XXX_Marshal ¶
func (m *TxnCommitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnCommitRequest) XXX_Merge ¶
func (m *TxnCommitRequest) XXX_Merge(src proto.Message)
func (*TxnCommitRequest) XXX_Size ¶
func (m *TxnCommitRequest) XXX_Size() int
func (*TxnCommitRequest) XXX_Unmarshal ¶
func (m *TxnCommitRequest) XXX_Unmarshal(b []byte) error
type TxnCommitResponse ¶
type TxnCommitResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnCommitResponse response of TxnCommitRequest.
func (*TxnCommitResponse) Descriptor ¶
func (*TxnCommitResponse) Descriptor() ([]byte, []int)
func (*TxnCommitResponse) Marshal ¶
func (m *TxnCommitResponse) Marshal() (dAtA []byte, err error)
func (*TxnCommitResponse) MarshalTo ¶
func (m *TxnCommitResponse) MarshalTo(dAtA []byte) (int, error)
func (*TxnCommitResponse) MarshalToSizedBuffer ¶
func (m *TxnCommitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnCommitResponse) ProtoMessage ¶
func (*TxnCommitResponse) ProtoMessage()
func (*TxnCommitResponse) Reset ¶
func (m *TxnCommitResponse) Reset()
func (*TxnCommitResponse) Size ¶
func (m *TxnCommitResponse) Size() (n int)
func (*TxnCommitResponse) String ¶
func (m *TxnCommitResponse) String() string
func (*TxnCommitResponse) Unmarshal ¶
func (m *TxnCommitResponse) Unmarshal(dAtA []byte) error
func (*TxnCommitResponse) XXX_DiscardUnknown ¶
func (m *TxnCommitResponse) XXX_DiscardUnknown()
func (*TxnCommitResponse) XXX_Marshal ¶
func (m *TxnCommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnCommitResponse) XXX_Merge ¶
func (m *TxnCommitResponse) XXX_Merge(src proto.Message)
func (*TxnCommitResponse) XXX_Size ¶
func (m *TxnCommitResponse) XXX_Size() int
func (*TxnCommitResponse) XXX_Unmarshal ¶
func (m *TxnCommitResponse) XXX_Unmarshal(b []byte) error
type TxnError ¶
type TxnError struct { // Code moerr code, used to special error handle without unmarshal moerr Code uint32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` // Error we use this field to send moerr from dn to cn. Set with // moerr.MarshalBinary, and use moerr.UnmarshalBinary to restore // moerr. Error []byte `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"` // TxnErrCode is a internal err code in the txn framework and used to indicate // what transaction operation failed. Usually this value is the same as the value // of Code, except for the error returned by the interface call to TxnStorage. // Because the types of errors returned by TxnStorage's interface are unknown to the // transaction framework, it is necessary to use a code for the interface call to uniformly // replace these error codes. TxnErrCode uint32 `protobuf:"varint,3,opt,name=TxnErrCode,proto3" json:"TxnErrCode,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnError all explicit errors in transaction operations.
func (TxnError) DebugString ¶
DebugString returns debug string
func (*TxnError) Descriptor ¶
func (*TxnError) GetTxnErrCode ¶ added in v0.6.0
func (*TxnError) MarshalToSizedBuffer ¶
func (*TxnError) ProtoMessage ¶
func (*TxnError) ProtoMessage()
func (TxnError) UnwrapError ¶ added in v0.6.0
UnwrapError unwrap the moerr from the TxnError
func (*TxnError) XXX_DiscardUnknown ¶
func (m *TxnError) XXX_DiscardUnknown()
func (*TxnError) XXX_Marshal ¶
func (*TxnError) XXX_Unmarshal ¶
type TxnGetStatusRequest ¶
type TxnGetStatusRequest struct { // DNShard target DN DNShard metadata.DNShard `protobuf:"bytes,1,opt,name=DNShard,proto3" json:"DNShard"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnGetStatusRequest query the status of a transaction on DN
func (*TxnGetStatusRequest) Descriptor ¶
func (*TxnGetStatusRequest) Descriptor() ([]byte, []int)
func (*TxnGetStatusRequest) GetDNShard ¶
func (m *TxnGetStatusRequest) GetDNShard() metadata.DNShard
func (*TxnGetStatusRequest) Marshal ¶
func (m *TxnGetStatusRequest) Marshal() (dAtA []byte, err error)
func (*TxnGetStatusRequest) MarshalTo ¶
func (m *TxnGetStatusRequest) MarshalTo(dAtA []byte) (int, error)
func (*TxnGetStatusRequest) MarshalToSizedBuffer ¶
func (m *TxnGetStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnGetStatusRequest) ProtoMessage ¶
func (*TxnGetStatusRequest) ProtoMessage()
func (*TxnGetStatusRequest) Reset ¶
func (m *TxnGetStatusRequest) Reset()
func (*TxnGetStatusRequest) Size ¶
func (m *TxnGetStatusRequest) Size() (n int)
func (*TxnGetStatusRequest) String ¶
func (m *TxnGetStatusRequest) String() string
func (*TxnGetStatusRequest) Unmarshal ¶
func (m *TxnGetStatusRequest) Unmarshal(dAtA []byte) error
func (*TxnGetStatusRequest) XXX_DiscardUnknown ¶
func (m *TxnGetStatusRequest) XXX_DiscardUnknown()
func (*TxnGetStatusRequest) XXX_Marshal ¶
func (m *TxnGetStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnGetStatusRequest) XXX_Merge ¶
func (m *TxnGetStatusRequest) XXX_Merge(src proto.Message)
func (*TxnGetStatusRequest) XXX_Size ¶
func (m *TxnGetStatusRequest) XXX_Size() int
func (*TxnGetStatusRequest) XXX_Unmarshal ¶
func (m *TxnGetStatusRequest) XXX_Unmarshal(b []byte) error
type TxnGetStatusResponse ¶
type TxnGetStatusResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnGetStatusResponse response of TxnGetStatusRequest
func (*TxnGetStatusResponse) Descriptor ¶
func (*TxnGetStatusResponse) Descriptor() ([]byte, []int)
func (*TxnGetStatusResponse) Marshal ¶
func (m *TxnGetStatusResponse) Marshal() (dAtA []byte, err error)
func (*TxnGetStatusResponse) MarshalTo ¶
func (m *TxnGetStatusResponse) MarshalTo(dAtA []byte) (int, error)
func (*TxnGetStatusResponse) MarshalToSizedBuffer ¶
func (m *TxnGetStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnGetStatusResponse) ProtoMessage ¶
func (*TxnGetStatusResponse) ProtoMessage()
func (*TxnGetStatusResponse) Reset ¶
func (m *TxnGetStatusResponse) Reset()
func (*TxnGetStatusResponse) Size ¶
func (m *TxnGetStatusResponse) Size() (n int)
func (*TxnGetStatusResponse) String ¶
func (m *TxnGetStatusResponse) String() string
func (*TxnGetStatusResponse) Unmarshal ¶
func (m *TxnGetStatusResponse) Unmarshal(dAtA []byte) error
func (*TxnGetStatusResponse) XXX_DiscardUnknown ¶
func (m *TxnGetStatusResponse) XXX_DiscardUnknown()
func (*TxnGetStatusResponse) XXX_Marshal ¶
func (m *TxnGetStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnGetStatusResponse) XXX_Merge ¶
func (m *TxnGetStatusResponse) XXX_Merge(src proto.Message)
func (*TxnGetStatusResponse) XXX_Size ¶
func (m *TxnGetStatusResponse) XXX_Size() int
func (*TxnGetStatusResponse) XXX_Unmarshal ¶
func (m *TxnGetStatusResponse) XXX_Unmarshal(b []byte) error
type TxnIsolation ¶ added in v0.8.0
type TxnIsolation int32
TxnIsolation txn txn isolation
const ( // SI snapshot isolation TxnIsolation_SI TxnIsolation = 0 // RC read committed TxnIsolation_RC TxnIsolation = 1 )
func GetTxnIsolation ¶ added in v0.8.0
func GetTxnIsolation(value string) TxnIsolation
GetTxnIsolation get txn mode from string
func (TxnIsolation) EnumDescriptor ¶ added in v0.8.0
func (TxnIsolation) EnumDescriptor() ([]byte, []int)
func (TxnIsolation) String ¶ added in v0.8.0
func (x TxnIsolation) String() string
type TxnMeta ¶
type TxnMeta struct { // ID transaction id, generated at the CN node at the time of transaction creation, // globally unique. ID []byte `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` // Status transaction status Status TxnStatus `protobuf:"varint,2,opt,name=Status,proto3,enum=txn.TxnStatus" json:"Status,omitempty"` // SnapshotTS transaction read timestamp, generated at the CN node at the time of // transaction creation. All data.TS < txn.SnapshotTS is visible for the current // transaction. SnapshotTS timestamp.Timestamp `protobuf:"bytes,3,opt,name=SnapshotTS,proto3" json:"SnapshotTS"` // PreparedTS timestamp to complete the first phase of a 2pc commit transaction. PreparedTS timestamp.Timestamp `protobuf:"bytes,4,opt,name=PreparedTS,proto3" json:"PreparedTS"` // CommitTS transaction commit timestamp. For a 2pc transaction, commitTS = max(preparedTS). CommitTS timestamp.Timestamp `protobuf:"bytes,5,opt,name=CommitTS,proto3" json:"CommitTS"` // DNShards all DNShards that have written data. The first DN is the coordinator of the // transaction DNShards []metadata.DNShard `protobuf:"bytes,6,rep,name=DNShards,proto3" json:"DNShards"` // LockTables For pessimistic transactions, LockTables record the bind metadata of the // LockTable corresponding to the successful locking of the current transaction. This data // is committed to the DN at Commit time, and the DN will check once if these bindings have // changed, and if they have, the transaction will be rolled back. LockTables []lock.LockTable `protobuf:"bytes,7,rep,name=LockTables,proto3" json:"LockTables"` // TxnMode txn mode Mode TxnMode `protobuf:"varint,8,opt,name=Mode,proto3,enum=txn.TxnMode" json:"Mode,omitempty"` // TxnIsolation isolation Isolation TxnIsolation `protobuf:"varint,9,opt,name=Isolation,proto3,enum=txn.TxnIsolation" json:"Isolation,omitempty"` // Mirror is mirror is true, means the current txn is not created on current node. Mirror bool `protobuf:"varint,10,opt,name=Mirror,proto3" json:"Mirror,omitempty"` // LockService lock service's service address. Empty if is not pessimistic txn. LockService string `protobuf:"bytes,11,opt,name=LockService,proto3" json:"LockService,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnMeta transaction metadata
func (*TxnMeta) Descriptor ¶
func (*TxnMeta) GetCommitTS ¶
func (*TxnMeta) GetDNShards ¶
func (*TxnMeta) GetIsolation ¶ added in v0.8.0
func (m *TxnMeta) GetIsolation() TxnIsolation
func (*TxnMeta) GetLockService ¶ added in v0.8.0
func (*TxnMeta) GetLockTables ¶ added in v0.8.0
func (*TxnMeta) GetPreparedTS ¶
func (*TxnMeta) GetSnapshotTS ¶
func (TxnMeta) IsPessimistic ¶ added in v0.8.0
IsPessimistic returns true if txn is in pessimistic mode
func (TxnMeta) IsRCIsolation ¶ added in v0.8.0
IsRCIsolation returns the isolation of current txn
func (*TxnMeta) MarshalToSizedBuffer ¶
func (*TxnMeta) ProtoMessage ¶
func (*TxnMeta) ProtoMessage()
func (*TxnMeta) XXX_DiscardUnknown ¶
func (m *TxnMeta) XXX_DiscardUnknown()
func (*TxnMeta) XXX_Marshal ¶
func (*TxnMeta) XXX_Unmarshal ¶
type TxnMethod ¶
type TxnMethod int32
TxnMethod transaction operations
const ( // Read transaction read TxnMethod_Read TxnMethod = 0 // Write transaction write TxnMethod_Write TxnMethod = 1 // Commit commit transaction TxnMethod_Commit TxnMethod = 2 // Rollback rollback transaction TxnMethod_Rollback TxnMethod = 3 // Prepare when DN(Coordinator) receives a commit request from CN, it sends a prepare to // each DN(DNShard) TxnMethod_Prepare TxnMethod = 4 // GetStatus query the status of a transaction on a DN. When a DN encounters a transaction // in the Prepared state, it needs to go to the DN(Coordinator) to query the status of the // current transaction. When a DN encounters a transaction in the Prepared state during the // recover, it needs to query the status of the transaction on each DN(DNShard) to determine // if the transaction is committed. TxnMethod_GetStatus TxnMethod = 5 // CommitDNShard after the 2pc transaction is committed, the temporary data on each DN needs // to be explicitly converted to committed data. TxnMethod_CommitDNShard TxnMethod = 6 // RollbackDNShard after the 2pc transaction is aborted, the temporary data on each DN needs // to cleanup. TxnMethod_RollbackDNShard TxnMethod = 7 // RemoveMedata Remove metadata for transactions on DNShard. For a 2pc distributed transaction, // after all participating DNShards have Prepared successfully, the asynchronous commit process // starts, sending CommitDNShard requests to all participating DNShards in parallel. After each // DNShard has processed the CommitDNShard, the metadata of the transaction cannot be deleted // immediately, otherwise when the transaction coordinator node is down and restarted, the commit // status of the transaction cannot be determined in the recovery process, as it is possible that // some participating DNShards cannot find the transaction information. // // TODO: needs to work with TAE's log compaction, not currently supported. TxnMethod_RemoveMedata TxnMethod = 8 // DEBUG used to send debug request from cn to dn, and received response from dn to cn TxnMethod_DEBUG TxnMethod = 9 )
func (TxnMethod) EnumDescriptor ¶
type TxnMode ¶ added in v0.8.0
type TxnMode int32
TxnMode txn mode
func GetTxnMode ¶ added in v0.8.0
GetTxnMode get txn mode from string
func (TxnMode) EnumDescriptor ¶ added in v0.8.0
type TxnPrepareRequest ¶
type TxnPrepareRequest struct { // DNShard prepare DN DNShard metadata.DNShard `protobuf:"bytes,1,opt,name=DNShard,proto3" json:"DNShard"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnPrepareRequest when a DN(coordinator) receives a Commit request from a CN, if more than one DN is involved, the 2PC commit process is enabled and the first phase is to send prepare requests to all DNs.
func (*TxnPrepareRequest) Descriptor ¶
func (*TxnPrepareRequest) Descriptor() ([]byte, []int)
func (*TxnPrepareRequest) GetDNShard ¶
func (m *TxnPrepareRequest) GetDNShard() metadata.DNShard
func (*TxnPrepareRequest) Marshal ¶
func (m *TxnPrepareRequest) Marshal() (dAtA []byte, err error)
func (*TxnPrepareRequest) MarshalTo ¶
func (m *TxnPrepareRequest) MarshalTo(dAtA []byte) (int, error)
func (*TxnPrepareRequest) MarshalToSizedBuffer ¶
func (m *TxnPrepareRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnPrepareRequest) ProtoMessage ¶
func (*TxnPrepareRequest) ProtoMessage()
func (*TxnPrepareRequest) Reset ¶
func (m *TxnPrepareRequest) Reset()
func (*TxnPrepareRequest) Size ¶
func (m *TxnPrepareRequest) Size() (n int)
func (*TxnPrepareRequest) String ¶
func (m *TxnPrepareRequest) String() string
func (*TxnPrepareRequest) Unmarshal ¶
func (m *TxnPrepareRequest) Unmarshal(dAtA []byte) error
func (*TxnPrepareRequest) XXX_DiscardUnknown ¶
func (m *TxnPrepareRequest) XXX_DiscardUnknown()
func (*TxnPrepareRequest) XXX_Marshal ¶
func (m *TxnPrepareRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnPrepareRequest) XXX_Merge ¶
func (m *TxnPrepareRequest) XXX_Merge(src proto.Message)
func (*TxnPrepareRequest) XXX_Size ¶
func (m *TxnPrepareRequest) XXX_Size() int
func (*TxnPrepareRequest) XXX_Unmarshal ¶
func (m *TxnPrepareRequest) XXX_Unmarshal(b []byte) error
type TxnPrepareResponse ¶
type TxnPrepareResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnPrepareResponse response of TxnPrepareRequest
func (*TxnPrepareResponse) Descriptor ¶
func (*TxnPrepareResponse) Descriptor() ([]byte, []int)
func (*TxnPrepareResponse) Marshal ¶
func (m *TxnPrepareResponse) Marshal() (dAtA []byte, err error)
func (*TxnPrepareResponse) MarshalTo ¶
func (m *TxnPrepareResponse) MarshalTo(dAtA []byte) (int, error)
func (*TxnPrepareResponse) MarshalToSizedBuffer ¶
func (m *TxnPrepareResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnPrepareResponse) ProtoMessage ¶
func (*TxnPrepareResponse) ProtoMessage()
func (*TxnPrepareResponse) Reset ¶
func (m *TxnPrepareResponse) Reset()
func (*TxnPrepareResponse) Size ¶
func (m *TxnPrepareResponse) Size() (n int)
func (*TxnPrepareResponse) String ¶
func (m *TxnPrepareResponse) String() string
func (*TxnPrepareResponse) Unmarshal ¶
func (m *TxnPrepareResponse) Unmarshal(dAtA []byte) error
func (*TxnPrepareResponse) XXX_DiscardUnknown ¶
func (m *TxnPrepareResponse) XXX_DiscardUnknown()
func (*TxnPrepareResponse) XXX_Marshal ¶
func (m *TxnPrepareResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnPrepareResponse) XXX_Merge ¶
func (m *TxnPrepareResponse) XXX_Merge(src proto.Message)
func (*TxnPrepareResponse) XXX_Size ¶
func (m *TxnPrepareResponse) XXX_Size() int
func (*TxnPrepareResponse) XXX_Unmarshal ¶
func (m *TxnPrepareResponse) XXX_Unmarshal(b []byte) error
type TxnRemoveMetadataRequest ¶
type TxnRemoveMetadataRequest struct { // DNShard target DN DNShard metadata.DNShard `protobuf:"bytes,1,opt,name=DNShard,proto3" json:"DNShard"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnRemoveMetadataRequest remove txn metadata on DNShard
func (*TxnRemoveMetadataRequest) Descriptor ¶
func (*TxnRemoveMetadataRequest) Descriptor() ([]byte, []int)
func (*TxnRemoveMetadataRequest) GetDNShard ¶
func (m *TxnRemoveMetadataRequest) GetDNShard() metadata.DNShard
func (*TxnRemoveMetadataRequest) Marshal ¶
func (m *TxnRemoveMetadataRequest) Marshal() (dAtA []byte, err error)
func (*TxnRemoveMetadataRequest) MarshalTo ¶
func (m *TxnRemoveMetadataRequest) MarshalTo(dAtA []byte) (int, error)
func (*TxnRemoveMetadataRequest) MarshalToSizedBuffer ¶
func (m *TxnRemoveMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnRemoveMetadataRequest) ProtoMessage ¶
func (*TxnRemoveMetadataRequest) ProtoMessage()
func (*TxnRemoveMetadataRequest) Reset ¶
func (m *TxnRemoveMetadataRequest) Reset()
func (*TxnRemoveMetadataRequest) Size ¶
func (m *TxnRemoveMetadataRequest) Size() (n int)
func (*TxnRemoveMetadataRequest) String ¶
func (m *TxnRemoveMetadataRequest) String() string
func (*TxnRemoveMetadataRequest) Unmarshal ¶
func (m *TxnRemoveMetadataRequest) Unmarshal(dAtA []byte) error
func (*TxnRemoveMetadataRequest) XXX_DiscardUnknown ¶
func (m *TxnRemoveMetadataRequest) XXX_DiscardUnknown()
func (*TxnRemoveMetadataRequest) XXX_Marshal ¶
func (m *TxnRemoveMetadataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnRemoveMetadataRequest) XXX_Merge ¶
func (m *TxnRemoveMetadataRequest) XXX_Merge(src proto.Message)
func (*TxnRemoveMetadataRequest) XXX_Size ¶
func (m *TxnRemoveMetadataRequest) XXX_Size() int
func (*TxnRemoveMetadataRequest) XXX_Unmarshal ¶
func (m *TxnRemoveMetadataRequest) XXX_Unmarshal(b []byte) error
type TxnRemoveMetadataResponse ¶
type TxnRemoveMetadataResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnRemoveMetadataResponse response of TxnRemoveMetadataRequest
func (*TxnRemoveMetadataResponse) Descriptor ¶
func (*TxnRemoveMetadataResponse) Descriptor() ([]byte, []int)
func (*TxnRemoveMetadataResponse) Marshal ¶
func (m *TxnRemoveMetadataResponse) Marshal() (dAtA []byte, err error)
func (*TxnRemoveMetadataResponse) MarshalTo ¶
func (m *TxnRemoveMetadataResponse) MarshalTo(dAtA []byte) (int, error)
func (*TxnRemoveMetadataResponse) MarshalToSizedBuffer ¶
func (m *TxnRemoveMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnRemoveMetadataResponse) ProtoMessage ¶
func (*TxnRemoveMetadataResponse) ProtoMessage()
func (*TxnRemoveMetadataResponse) Reset ¶
func (m *TxnRemoveMetadataResponse) Reset()
func (*TxnRemoveMetadataResponse) Size ¶
func (m *TxnRemoveMetadataResponse) Size() (n int)
func (*TxnRemoveMetadataResponse) String ¶
func (m *TxnRemoveMetadataResponse) String() string
func (*TxnRemoveMetadataResponse) Unmarshal ¶
func (m *TxnRemoveMetadataResponse) Unmarshal(dAtA []byte) error
func (*TxnRemoveMetadataResponse) XXX_DiscardUnknown ¶
func (m *TxnRemoveMetadataResponse) XXX_DiscardUnknown()
func (*TxnRemoveMetadataResponse) XXX_Marshal ¶
func (m *TxnRemoveMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnRemoveMetadataResponse) XXX_Merge ¶
func (m *TxnRemoveMetadataResponse) XXX_Merge(src proto.Message)
func (*TxnRemoveMetadataResponse) XXX_Size ¶
func (m *TxnRemoveMetadataResponse) XXX_Size() int
func (*TxnRemoveMetadataResponse) XXX_Unmarshal ¶
func (m *TxnRemoveMetadataResponse) XXX_Unmarshal(b []byte) error
type TxnRequest ¶
type TxnRequest struct { // RequestID request id RequestID uint64 `protobuf:"varint,1,opt,name=RequestID,proto3" json:"RequestID,omitempty"` // Txn transaction metadata Txn TxnMeta `protobuf:"bytes,2,opt,name=Txn,proto3" json:"Txn"` // TxnMethod TxnRequest opCode, select the Request defined below according to TxnMethod. Method TxnMethod `protobuf:"varint,3,opt,name=Method,proto3,enum=txn.TxnMethod" json:"Method,omitempty"` // Flag request flag Flag uint32 `protobuf:"varint,4,opt,name=Flag,proto3" json:"Flag,omitempty"` // CNOpRequest corresponds to TxnMethod.Read, TxnMethod.Write CNRequest *CNOpRequest `protobuf:"bytes,5,opt,name=CNRequest,proto3" json:"CNRequest,omitempty"` // TxnCommitRequest corresponds to TxnMethod.Commit CommitRequest *TxnCommitRequest `protobuf:"bytes,6,opt,name=CommitRequest,proto3" json:"CommitRequest,omitempty"` // TxnRollbackRequest corresponds to TxnMethod.Rollback RollbackRequest *TxnRollbackRequest `protobuf:"bytes,7,opt,name=RollbackRequest,proto3" json:"RollbackRequest,omitempty"` // TxnPrepareRequest corresponds to TxnMethod.Prepare PrepareRequest *TxnPrepareRequest `protobuf:"bytes,8,opt,name=PrepareRequest,proto3" json:"PrepareRequest,omitempty"` // TxnGetStatusRequest corresponds to TxnMethod.GetStatus GetStatusRequest *TxnGetStatusRequest `protobuf:"bytes,9,opt,name=GetStatusRequest,proto3" json:"GetStatusRequest,omitempty"` // TxnCommitDNShardRequest corresponds to TxnMethod.CommitDNShard CommitDNShardRequest *TxnCommitDNShardRequest `protobuf:"bytes,10,opt,name=CommitDNShardRequest,proto3" json:"CommitDNShardRequest,omitempty"` // TxnRollbackDNShardRequest corresponds to TxnMethod.RollbackDNShard RollbackDNShardRequest *TxnRollbackDNShardRequest `protobuf:"bytes,11,opt,name=RollbackDNShardRequest,proto3" json:"RollbackDNShardRequest,omitempty"` // TxnRemoveMetadataRequest corresponds to TxnMethod.RemoveMetadata RemoveMetadata *TxnRemoveMetadataRequest `protobuf:"bytes,12,opt,name=RemoveMetadata,proto3" json:"RemoveMetadata,omitempty"` // TxnRequestOptions request options Options *TxnRequestOptions `protobuf:"bytes,13,opt,name=Options,proto3" json:"Options,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnRequest transaction request. All requests for the transaction are made using TxnRequest, so that the codec and logical processing of the RPC can be unified. Specific requests are selected according to TxnMethod.
Request flow of TxnRequest as below:
- CN -> DN (TxnMethod.Read, TxnMethod.Write, TxnMethod.Commit, TxnMethod.Rollback)
- DN -> DN (TxnMethod.Prepare, TxnMethod.GetStatus, TxnMethod.CommitDNShard, TxnMethod.RollbackDNShard, TxnMethod.RemoveMetadata)
func NewTxnRequest ¶
func NewTxnRequest(request *CNOpRequest) TxnRequest
NewTxnRequest create TxnRequest by CNOpRequest
func (TxnRequest) DebugString ¶
func (m TxnRequest) DebugString() string
DebugString returns debug string
func (TxnRequest) DebugStringWithPayload ¶ added in v0.7.0
func (m TxnRequest) DebugStringWithPayload(withPayload bool) string
DebugStringWithPayload returns debug string with payload bytes if withPayload is true
func (*TxnRequest) Descriptor ¶
func (*TxnRequest) Descriptor() ([]byte, []int)
func (*TxnRequest) GetCNRequest ¶
func (m *TxnRequest) GetCNRequest() *CNOpRequest
func (*TxnRequest) GetCommitDNShardRequest ¶
func (m *TxnRequest) GetCommitDNShardRequest() *TxnCommitDNShardRequest
func (*TxnRequest) GetCommitRequest ¶
func (m *TxnRequest) GetCommitRequest() *TxnCommitRequest
func (*TxnRequest) GetFlag ¶
func (m *TxnRequest) GetFlag() uint32
func (*TxnRequest) GetGetStatusRequest ¶
func (m *TxnRequest) GetGetStatusRequest() *TxnGetStatusRequest
func (*TxnRequest) GetMethod ¶
func (m *TxnRequest) GetMethod() TxnMethod
func (*TxnRequest) GetOptions ¶ added in v0.6.0
func (m *TxnRequest) GetOptions() *TxnRequestOptions
func (*TxnRequest) GetPrepareRequest ¶
func (m *TxnRequest) GetPrepareRequest() *TxnPrepareRequest
func (*TxnRequest) GetRemoveMetadata ¶
func (m *TxnRequest) GetRemoveMetadata() *TxnRemoveMetadataRequest
func (*TxnRequest) GetRequestID ¶
func (m *TxnRequest) GetRequestID() uint64
func (*TxnRequest) GetRollbackDNShardRequest ¶
func (m *TxnRequest) GetRollbackDNShardRequest() *TxnRollbackDNShardRequest
func (*TxnRequest) GetRollbackRequest ¶
func (m *TxnRequest) GetRollbackRequest() *TxnRollbackRequest
func (TxnRequest) GetTargetDN ¶
func (m TxnRequest) GetTargetDN() metadata.DNShard
GetTargetDN return dn shard ID that message need send to.
func (*TxnRequest) GetTxn ¶
func (m *TxnRequest) GetTxn() TxnMeta
func (*TxnRequest) Marshal ¶
func (m *TxnRequest) Marshal() (dAtA []byte, err error)
func (*TxnRequest) MarshalToSizedBuffer ¶
func (m *TxnRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnRequest) ProtoMessage ¶
func (*TxnRequest) ProtoMessage()
func (*TxnRequest) Reset ¶
func (m *TxnRequest) Reset()
func (*TxnRequest) Size ¶
func (m *TxnRequest) Size() (n int)
func (*TxnRequest) String ¶
func (m *TxnRequest) String() string
func (*TxnRequest) Unmarshal ¶
func (m *TxnRequest) Unmarshal(dAtA []byte) error
func (*TxnRequest) XXX_DiscardUnknown ¶
func (m *TxnRequest) XXX_DiscardUnknown()
func (*TxnRequest) XXX_Marshal ¶
func (m *TxnRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnRequest) XXX_Merge ¶
func (m *TxnRequest) XXX_Merge(src proto.Message)
func (*TxnRequest) XXX_Size ¶
func (m *TxnRequest) XXX_Size() int
func (*TxnRequest) XXX_Unmarshal ¶
func (m *TxnRequest) XXX_Unmarshal(b []byte) error
type TxnRequestOptions ¶ added in v0.6.0
type TxnRequestOptions struct { // RetryCodes when DN processes TxnRequest and encounters the specified error, it needs to retry // on the server side. Only read and write can retry. RetryCodes []int32 `protobuf:"varint,1,rep,packed,name=RetryCodes,proto3" json:"RetryCodes,omitempty"` // RetryInterval retry interval, default is 100ms. RetryInterval int64 `protobuf:"varint,2,opt,name=RetryInterval,proto3" json:"RetryInterval,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnRequestOptions txn options
func (*TxnRequestOptions) Descriptor ¶ added in v0.6.0
func (*TxnRequestOptions) Descriptor() ([]byte, []int)
func (*TxnRequestOptions) GetRetryCodes ¶ added in v0.6.0
func (m *TxnRequestOptions) GetRetryCodes() []int32
func (*TxnRequestOptions) GetRetryInterval ¶ added in v0.6.0
func (m *TxnRequestOptions) GetRetryInterval() int64
func (*TxnRequestOptions) Marshal ¶ added in v0.6.0
func (m *TxnRequestOptions) Marshal() (dAtA []byte, err error)
func (*TxnRequestOptions) MarshalTo ¶ added in v0.6.0
func (m *TxnRequestOptions) MarshalTo(dAtA []byte) (int, error)
func (*TxnRequestOptions) MarshalToSizedBuffer ¶ added in v0.6.0
func (m *TxnRequestOptions) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnRequestOptions) ProtoMessage ¶ added in v0.6.0
func (*TxnRequestOptions) ProtoMessage()
func (*TxnRequestOptions) Reset ¶ added in v0.6.0
func (m *TxnRequestOptions) Reset()
func (*TxnRequestOptions) Size ¶ added in v0.6.0
func (m *TxnRequestOptions) Size() (n int)
func (*TxnRequestOptions) String ¶ added in v0.6.0
func (m *TxnRequestOptions) String() string
func (*TxnRequestOptions) Unmarshal ¶ added in v0.6.0
func (m *TxnRequestOptions) Unmarshal(dAtA []byte) error
func (*TxnRequestOptions) XXX_DiscardUnknown ¶ added in v0.6.0
func (m *TxnRequestOptions) XXX_DiscardUnknown()
func (*TxnRequestOptions) XXX_Marshal ¶ added in v0.6.0
func (m *TxnRequestOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnRequestOptions) XXX_Merge ¶ added in v0.6.0
func (m *TxnRequestOptions) XXX_Merge(src proto.Message)
func (*TxnRequestOptions) XXX_Size ¶ added in v0.6.0
func (m *TxnRequestOptions) XXX_Size() int
func (*TxnRequestOptions) XXX_Unmarshal ¶ added in v0.6.0
func (m *TxnRequestOptions) XXX_Unmarshal(b []byte) error
type TxnResponse ¶
type TxnResponse struct { // RequestID corresponding request id RequestID uint64 `protobuf:"varint,1,opt,name=RequestID,proto3" json:"RequestID,omitempty"` // Txn transaction metadata. TxnResponse.TxnMeta and TxnRequest.TxnMeta may differ // in that the node initiating the TxnRequest needs to process the returned TxnMeta, // e.g. to determine whether the transaction is Aborted by the status of the returned // TxnMeta. Txn *TxnMeta `protobuf:"bytes,2,opt,name=Txn,proto3" json:"Txn,omitempty"` // TxnMethod same as TxnRequest.TxnMethod Method TxnMethod `protobuf:"varint,3,opt,name=Method,proto3,enum=txn.TxnMethod" json:"Method,omitempty"` // Flag request flag, same as the corresponding request Flag uint32 `protobuf:"varint,4,opt,name=Flag,proto3" json:"Flag,omitempty"` // TxnError explicit error TxnError *TxnError `protobuf:"bytes,5,opt,name=TxnError,proto3" json:"TxnError,omitempty"` // CNOpResponse corresponds to TxnMethod.Read, TxnMethod.Write response CNOpResponse *CNOpResponse `protobuf:"bytes,6,opt,name=CNOpResponse,proto3" json:"CNOpResponse,omitempty"` // TxnCommitResponse corresponds to TxnMethod.Commit response CommitResponse *TxnCommitResponse `protobuf:"bytes,7,opt,name=CommitResponse,proto3" json:"CommitResponse,omitempty"` // TxnRollbackResponse corresponds to TxnMethod.Rollback response RollbackResponse *TxnRollbackResponse `protobuf:"bytes,8,opt,name=RollbackResponse,proto3" json:"RollbackResponse,omitempty"` // TxnPrepareResponse corresponds to TxnMethod.Prepare response PrepareResponse *TxnPrepareResponse `protobuf:"bytes,9,opt,name=PrepareResponse,proto3" json:"PrepareResponse,omitempty"` // TxnGetStatusResponse corresponds to TxnMethod.GetStatus response GetStatusResponse *TxnGetStatusResponse `protobuf:"bytes,10,opt,name=GetStatusResponse,proto3" json:"GetStatusResponse,omitempty"` // TxnCommitDNShardResponse corresponds to TxnMethod.CommitDNShard response CommitDNShardResponse *TxnCommitDNShardResponse `protobuf:"bytes,11,opt,name=CommitDNShardResponse,proto3" json:"CommitDNShardResponse,omitempty"` // TxnRollbackDNShardResponse corresponds to TxnMethod.RollbackDNShard response RollbackDNShardResponse *TxnRollbackDNShardResponse `protobuf:"bytes,12,opt,name=RollbackDNShardResponse,proto3" json:"RollbackDNShardResponse,omitempty"` // TxnRemoveMetadataResponse corresponds to TxnMethod.RemoveMetadata RemoveMetadata *TxnRemoveMetadataResponse `protobuf:"bytes,13,opt,name=RemoveMetadata,proto3" json:"RemoveMetadata,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnResponse response of TxnRequest.
func (TxnResponse) DebugString ¶
func (m TxnResponse) DebugString() string
DebugString returns debug string
func (*TxnResponse) Descriptor ¶
func (*TxnResponse) Descriptor() ([]byte, []int)
func (*TxnResponse) GetCNOpResponse ¶
func (m *TxnResponse) GetCNOpResponse() *CNOpResponse
func (*TxnResponse) GetCommitDNShardResponse ¶
func (m *TxnResponse) GetCommitDNShardResponse() *TxnCommitDNShardResponse
func (*TxnResponse) GetCommitResponse ¶
func (m *TxnResponse) GetCommitResponse() *TxnCommitResponse
func (*TxnResponse) GetFlag ¶
func (m *TxnResponse) GetFlag() uint32
func (*TxnResponse) GetGetStatusResponse ¶
func (m *TxnResponse) GetGetStatusResponse() *TxnGetStatusResponse
func (*TxnResponse) GetMethod ¶
func (m *TxnResponse) GetMethod() TxnMethod
func (*TxnResponse) GetPrepareResponse ¶
func (m *TxnResponse) GetPrepareResponse() *TxnPrepareResponse
func (*TxnResponse) GetRemoveMetadata ¶
func (m *TxnResponse) GetRemoveMetadata() *TxnRemoveMetadataResponse
func (*TxnResponse) GetRequestID ¶
func (m *TxnResponse) GetRequestID() uint64
func (*TxnResponse) GetRollbackDNShardResponse ¶
func (m *TxnResponse) GetRollbackDNShardResponse() *TxnRollbackDNShardResponse
func (*TxnResponse) GetRollbackResponse ¶
func (m *TxnResponse) GetRollbackResponse() *TxnRollbackResponse
func (*TxnResponse) GetTxn ¶
func (m *TxnResponse) GetTxn() *TxnMeta
func (*TxnResponse) GetTxnError ¶
func (m *TxnResponse) GetTxnError() *TxnError
func (TxnResponse) HasFlag ¶
func (m TxnResponse) HasFlag(flag uint32) bool
HasFlag returns true if has the spec flag
func (*TxnResponse) Marshal ¶
func (m *TxnResponse) Marshal() (dAtA []byte, err error)
func (*TxnResponse) MarshalToSizedBuffer ¶
func (m *TxnResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnResponse) ProtoMessage ¶
func (*TxnResponse) ProtoMessage()
func (*TxnResponse) Reset ¶
func (m *TxnResponse) Reset()
func (*TxnResponse) Size ¶
func (m *TxnResponse) Size() (n int)
func (*TxnResponse) String ¶
func (m *TxnResponse) String() string
func (*TxnResponse) Unmarshal ¶
func (m *TxnResponse) Unmarshal(dAtA []byte) error
func (*TxnResponse) XXX_DiscardUnknown ¶
func (m *TxnResponse) XXX_DiscardUnknown()
func (*TxnResponse) XXX_Marshal ¶
func (m *TxnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnResponse) XXX_Merge ¶
func (m *TxnResponse) XXX_Merge(src proto.Message)
func (*TxnResponse) XXX_Size ¶
func (m *TxnResponse) XXX_Size() int
func (*TxnResponse) XXX_Unmarshal ¶
func (m *TxnResponse) XXX_Unmarshal(b []byte) error
type TxnRollbackDNShardRequest ¶
type TxnRollbackDNShardRequest struct { // DNShard target DN DNShard metadata.DNShard `protobuf:"bytes,1,opt,name=DNShard,proto3" json:"DNShard"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnRollbackDNShardRequest rollback txn on DNShard
func (*TxnRollbackDNShardRequest) Descriptor ¶
func (*TxnRollbackDNShardRequest) Descriptor() ([]byte, []int)
func (*TxnRollbackDNShardRequest) GetDNShard ¶
func (m *TxnRollbackDNShardRequest) GetDNShard() metadata.DNShard
func (*TxnRollbackDNShardRequest) Marshal ¶
func (m *TxnRollbackDNShardRequest) Marshal() (dAtA []byte, err error)
func (*TxnRollbackDNShardRequest) MarshalTo ¶
func (m *TxnRollbackDNShardRequest) MarshalTo(dAtA []byte) (int, error)
func (*TxnRollbackDNShardRequest) MarshalToSizedBuffer ¶
func (m *TxnRollbackDNShardRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnRollbackDNShardRequest) ProtoMessage ¶
func (*TxnRollbackDNShardRequest) ProtoMessage()
func (*TxnRollbackDNShardRequest) Reset ¶
func (m *TxnRollbackDNShardRequest) Reset()
func (*TxnRollbackDNShardRequest) Size ¶
func (m *TxnRollbackDNShardRequest) Size() (n int)
func (*TxnRollbackDNShardRequest) String ¶
func (m *TxnRollbackDNShardRequest) String() string
func (*TxnRollbackDNShardRequest) Unmarshal ¶
func (m *TxnRollbackDNShardRequest) Unmarshal(dAtA []byte) error
func (*TxnRollbackDNShardRequest) XXX_DiscardUnknown ¶
func (m *TxnRollbackDNShardRequest) XXX_DiscardUnknown()
func (*TxnRollbackDNShardRequest) XXX_Marshal ¶
func (m *TxnRollbackDNShardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnRollbackDNShardRequest) XXX_Merge ¶
func (m *TxnRollbackDNShardRequest) XXX_Merge(src proto.Message)
func (*TxnRollbackDNShardRequest) XXX_Size ¶
func (m *TxnRollbackDNShardRequest) XXX_Size() int
func (*TxnRollbackDNShardRequest) XXX_Unmarshal ¶
func (m *TxnRollbackDNShardRequest) XXX_Unmarshal(b []byte) error
type TxnRollbackDNShardResponse ¶
type TxnRollbackDNShardResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnRollbackDNShardResponse response of TxnRollbackDNShardRequest
func (*TxnRollbackDNShardResponse) Descriptor ¶
func (*TxnRollbackDNShardResponse) Descriptor() ([]byte, []int)
func (*TxnRollbackDNShardResponse) Marshal ¶
func (m *TxnRollbackDNShardResponse) Marshal() (dAtA []byte, err error)
func (*TxnRollbackDNShardResponse) MarshalTo ¶
func (m *TxnRollbackDNShardResponse) MarshalTo(dAtA []byte) (int, error)
func (*TxnRollbackDNShardResponse) MarshalToSizedBuffer ¶
func (m *TxnRollbackDNShardResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnRollbackDNShardResponse) ProtoMessage ¶
func (*TxnRollbackDNShardResponse) ProtoMessage()
func (*TxnRollbackDNShardResponse) Reset ¶
func (m *TxnRollbackDNShardResponse) Reset()
func (*TxnRollbackDNShardResponse) Size ¶
func (m *TxnRollbackDNShardResponse) Size() (n int)
func (*TxnRollbackDNShardResponse) String ¶
func (m *TxnRollbackDNShardResponse) String() string
func (*TxnRollbackDNShardResponse) Unmarshal ¶
func (m *TxnRollbackDNShardResponse) Unmarshal(dAtA []byte) error
func (*TxnRollbackDNShardResponse) XXX_DiscardUnknown ¶
func (m *TxnRollbackDNShardResponse) XXX_DiscardUnknown()
func (*TxnRollbackDNShardResponse) XXX_Marshal ¶
func (m *TxnRollbackDNShardResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnRollbackDNShardResponse) XXX_Merge ¶
func (m *TxnRollbackDNShardResponse) XXX_Merge(src proto.Message)
func (*TxnRollbackDNShardResponse) XXX_Size ¶
func (m *TxnRollbackDNShardResponse) XXX_Size() int
func (*TxnRollbackDNShardResponse) XXX_Unmarshal ¶
func (m *TxnRollbackDNShardResponse) XXX_Unmarshal(b []byte) error
type TxnRollbackRequest ¶
type TxnRollbackRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnCommitRequest CN sent the rollback request to coordinator DN.
func (*TxnRollbackRequest) Descriptor ¶
func (*TxnRollbackRequest) Descriptor() ([]byte, []int)
func (*TxnRollbackRequest) Marshal ¶
func (m *TxnRollbackRequest) Marshal() (dAtA []byte, err error)
func (*TxnRollbackRequest) MarshalTo ¶
func (m *TxnRollbackRequest) MarshalTo(dAtA []byte) (int, error)
func (*TxnRollbackRequest) MarshalToSizedBuffer ¶
func (m *TxnRollbackRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnRollbackRequest) ProtoMessage ¶
func (*TxnRollbackRequest) ProtoMessage()
func (*TxnRollbackRequest) Reset ¶
func (m *TxnRollbackRequest) Reset()
func (*TxnRollbackRequest) Size ¶
func (m *TxnRollbackRequest) Size() (n int)
func (*TxnRollbackRequest) String ¶
func (m *TxnRollbackRequest) String() string
func (*TxnRollbackRequest) Unmarshal ¶
func (m *TxnRollbackRequest) Unmarshal(dAtA []byte) error
func (*TxnRollbackRequest) XXX_DiscardUnknown ¶
func (m *TxnRollbackRequest) XXX_DiscardUnknown()
func (*TxnRollbackRequest) XXX_Marshal ¶
func (m *TxnRollbackRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnRollbackRequest) XXX_Merge ¶
func (m *TxnRollbackRequest) XXX_Merge(src proto.Message)
func (*TxnRollbackRequest) XXX_Size ¶
func (m *TxnRollbackRequest) XXX_Size() int
func (*TxnRollbackRequest) XXX_Unmarshal ¶
func (m *TxnRollbackRequest) XXX_Unmarshal(b []byte) error
type TxnRollbackResponse ¶
type TxnRollbackResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
TxnRollbackResponse response of TxnRollbackRequest.
func (*TxnRollbackResponse) Descriptor ¶
func (*TxnRollbackResponse) Descriptor() ([]byte, []int)
func (*TxnRollbackResponse) Marshal ¶
func (m *TxnRollbackResponse) Marshal() (dAtA []byte, err error)
func (*TxnRollbackResponse) MarshalTo ¶
func (m *TxnRollbackResponse) MarshalTo(dAtA []byte) (int, error)
func (*TxnRollbackResponse) MarshalToSizedBuffer ¶
func (m *TxnRollbackResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxnRollbackResponse) ProtoMessage ¶
func (*TxnRollbackResponse) ProtoMessage()
func (*TxnRollbackResponse) Reset ¶
func (m *TxnRollbackResponse) Reset()
func (*TxnRollbackResponse) Size ¶
func (m *TxnRollbackResponse) Size() (n int)
func (*TxnRollbackResponse) String ¶
func (m *TxnRollbackResponse) String() string
func (*TxnRollbackResponse) Unmarshal ¶
func (m *TxnRollbackResponse) Unmarshal(dAtA []byte) error
func (*TxnRollbackResponse) XXX_DiscardUnknown ¶
func (m *TxnRollbackResponse) XXX_DiscardUnknown()
func (*TxnRollbackResponse) XXX_Marshal ¶
func (m *TxnRollbackResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxnRollbackResponse) XXX_Merge ¶
func (m *TxnRollbackResponse) XXX_Merge(src proto.Message)
func (*TxnRollbackResponse) XXX_Size ¶
func (m *TxnRollbackResponse) XXX_Size() int
func (*TxnRollbackResponse) XXX_Unmarshal ¶
func (m *TxnRollbackResponse) XXX_Unmarshal(b []byte) error
type TxnStatus ¶
type TxnStatus int32
TxnStatus transaction status
const ( // Active is the state of transaction creation, in this state, can execute the // transaction Read/Write/Commit/Rollback. TxnStatus_Active TxnStatus = 0 // Prepared for distributed transactions across DNs, a 2pc commit is performed, // and the prepared status means that the transaction on a DN was executed // successfully in the first phase. // // Note that this status needs to be saved to the LogService. Once the first // phase of a transaction is successful, data cannot be lost. TxnStatus_Prepared TxnStatus = 1 // Committing for distributed transactions across DNs, once all DNs have completed // the first phase, the transaction enters the Committing state and initiates an // asynchronous process to handle the commit of temporary data. // // Note that when all DNs involved are in the prepared state, the distributed // transaction can be considered committed because all data has been written // successfully. The subsequent Committing process just explicitly converts these // writes into committed data. // // Note that the state exists only in memory and is not persisted to the LogService. // It can be restored through the Prepared state, if all(DN).Status == Prepared. TxnStatus_Committing TxnStatus = 2 // Committed after the Committing phase has transformed all DN data involved into // committed data, the status of the distributed transaction is explicitly recorded // as Committed. // // Note that this status needs to be saved to the LogService TxnStatus_Committed TxnStatus = 3 // Aborting a client initiating a Rollback call or a distributed transaction that has // any error in the first phase will enter the Aborting state. This state starts an // asynchronous task to clean up the temporary data written by the transaction. // // Note that the state exists only in memory and is not persisted to the LogService. // It can be restored through the Prepared state, if Any(DN).Status != Prepared. TxnStatus_Aborting TxnStatus = 4 // Aborted after the Aborting phase, all data involved in the DN is cleaned up and // the transaction status is explicitly recorded as Aborted. // // Note that this status needs to be saved to the LogService TxnStatus_Aborted TxnStatus = 5 )