cockroach: github.com/cockroachdb/cockroach/pkg/roachpb Index | Files

package roachpb

import "github.com/cockroachdb/cockroach/pkg/roachpb"

Index

Package Files

api.go api.pb.go app_stats.go app_stats.pb.go batch.go batch_generated.go data.go data.pb.go errors.go errors.pb.go internal.go internal.pb.go internal_raft.pb.go io-formats.pb.go merge_spans.go metadata.go metadata.pb.go metadata_replicas.go method.go method_string.go span_group.go version.go

Constants

const MaxDiversityScore = 1.0

MaxDiversityScore is the largest possible diversity score, indicating that two localities are as different from each other as possible.

Variables

var (
    ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowApi   = fmt.Errorf("proto: integer overflow")
)
var (
    ErrInvalidLengthAppStats = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowAppStats   = fmt.Errorf("proto: integer overflow")
)
var (
    // RKeyMin is a minimum key value which sorts before all other keys.
    RKeyMin = RKey("")
    // KeyMin is a minimum key value which sorts before all other keys.
    KeyMin = Key(RKeyMin)
    // RKeyMax is a maximum key value which sorts after all other keys.
    RKeyMax = RKey{0xff, 0xff}
    // KeyMax is a maximum key value which sorts after all other keys.
    KeyMax = Key(RKeyMax)

    // PrettyPrintKey prints a key in human readable format. It's
    // implemented in package git.com/cockroachdb/cockroach/keys to avoid
    // package circle import.
    // valDirs correspond to the encoding direction of each encoded value
    // in the key (if known). If left unspecified, the default encoding
    // direction for each value type is used (see
    // encoding.go:prettyPrintFirstValue).
    PrettyPrintKey func(valDirs []encoding.Direction, key Key) string

    // PrettyPrintRange prints a key range in human readable format. It's
    // implemented in package git.com/cockroachdb/cockroach/keys to avoid
    // package circle import.
    PrettyPrintRange func(start, end Key, maxChars int) string
)
var (
    ErrInvalidLengthData = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowData   = fmt.Errorf("proto: integer overflow")
)
var (
    ErrInvalidLengthErrors = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowErrors   = fmt.Errorf("proto: integer overflow")
)
var (
    ErrInvalidLengthInternal = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowInternal   = fmt.Errorf("proto: integer overflow")
)
var (
    ErrInvalidLengthInternalRaft = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowInternalRaft   = fmt.Errorf("proto: integer overflow")
)
var (
    ErrInvalidLengthIoFormats = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowIoFormats   = fmt.Errorf("proto: integer overflow")
)
var (
    ErrInvalidLengthMetadata = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowMetadata   = fmt.Errorf("proto: integer overflow")
)
var CheckConsistencyResponse_Status_name = map[int32]string{
    0:  "RANGE_INDETERMINATE",
    1:  "RANGE_INCONSISTENT",
    2:  "RANGE_CONSISTENT",
    3:  "RANGE_CONSISTENT_STATS_ESTIMATED",
    4:  "RANGE_CONSISTENT_STATS_INCORRECT",
}
var CheckConsistencyResponse_Status_value = map[string]int32{
    "RANGE_INDETERMINATE":              0,
    "RANGE_INCONSISTENT":               1,
    "RANGE_CONSISTENT":                 2,
    "RANGE_CONSISTENT_STATS_ESTIMATED": 3,
    "RANGE_CONSISTENT_STATS_INCORRECT": 4,
}
var ChecksumMode_name = map[int32]string{
    0:  "CHECK_VIA_QUEUE",
    1:  "CHECK_FULL",
    2:  "CHECK_STATS",
}
var ChecksumMode_value = map[string]int32{
    "CHECK_VIA_QUEUE": 0,
    "CHECK_FULL":      1,
    "CHECK_STATS":     2,
}
var DefaultLocationInformation = []struct {
    Locality  Locality
    Latitude  string
    Longitude string
}{
    {
        Locality:  Locality{Tiers: []Tier{{Key: "region", Value: "us-east1"}}},
        Latitude:  "33.836082",
        Longitude: "-81.163727",
    },
    {
        Locality:  Locality{Tiers: []Tier{{Key: "region", Value: "us-east4"}}},
        Latitude:  "37.478397",
        Longitude: "-76.453077",
    },
    {
        Locality:  Locality{Tiers: []Tier{{Key: "region", Value: "us-central1"}}},
        Latitude:  "42.032974",
        Longitude: "-93.581543",
    },
    {
        Locality:  Locality{Tiers: []Tier{{Key: "region", Value: "us-west1"}}},
        Latitude:  "43.804133",
        Longitude: "-120.554201",
    },
    {
        Locality:  Locality{Tiers: []Tier{{Key: "region", Value: "europe-west1"}}},
        Latitude:  "50.44816",
        Longitude: "3.81886",
    },
}

DefaultLocationInformation is used to populate the system.locations table. The region values here are specific to GCP.

var ExportStorageProvider_name = map[int32]string{
    0:  "Unknown",
    1:  "LocalFile",
    2:  "Http",
    3:  "S3",
    4:  "GoogleCloud",
    5:  "Azure",
    6:  "Workload",
}
var ExportStorageProvider_value = map[string]int32{
    "Unknown":     0,
    "LocalFile":   1,
    "Http":        2,
    "S3":          3,
    "GoogleCloud": 4,
    "Azure":       5,
    "Workload":    6,
}
var IOFileFormat_Compression_name = map[int32]string{
    0:  "Auto",
    1:  "None",
    2:  "Gzip",
    3:  "Bzip",
}
var IOFileFormat_Compression_value = map[string]int32{
    "Auto": 0,
    "None": 1,
    "Gzip": 2,
    "Bzip": 3,
}
var IOFileFormat_FileFormat_name = map[int32]string{
    0:  "Unknown",
    1:  "CSV",
    2:  "MysqlOutfile",
    3:  "Mysqldump",
    4:  "PgCopy",
    5:  "PgDump",
}
var IOFileFormat_FileFormat_value = map[string]int32{
    "Unknown":      0,
    "CSV":          1,
    "MysqlOutfile": 2,
    "Mysqldump":    3,
    "PgCopy":       4,
    "PgDump":       5,
}
var MVCCFilter_name = map[int32]string{
    0:  "Latest",
    1:  "All",
}
var MVCCFilter_value = map[string]int32{
    "Latest": 0,
    "All":    1,
}
var MySQLOutfileOptions_Enclose_name = map[int32]string{
    0:  "Never",
    1:  "Always",
    2:  "Optional",
}
var MySQLOutfileOptions_Enclose_value = map[string]int32{
    "Never":    0,
    "Always":   1,
    "Optional": 2,
}
var PushTxnType_name = map[int32]string{
    0:  "PUSH_TIMESTAMP",
    1:  "PUSH_ABORT",
    2:  "PUSH_TOUCH",
}
var PushTxnType_value = map[string]int32{
    "PUSH_TIMESTAMP": 0,
    "PUSH_ABORT":     1,
    "PUSH_TOUCH":     2,
}
var RangeFeedRetryError_Reason_name = map[int32]string{
    0:  "REASON_REPLICA_REMOVED",
    1:  "REASON_RANGE_SPLIT",
    2:  "REASON_RANGE_MERGED",
    3:  "REASON_RAFT_SNAPSHOT",
    4:  "REASON_LOGICAL_OPS_MISSING",
    5:  "REASON_SLOW_CONSUMER",
}
var RangeFeedRetryError_Reason_value = map[string]int32{
    "REASON_REPLICA_REMOVED":     0,
    "REASON_RANGE_SPLIT":         1,
    "REASON_RANGE_MERGED":        2,
    "REASON_RAFT_SNAPSHOT":       3,
    "REASON_LOGICAL_OPS_MISSING": 4,
    "REASON_SLOW_CONSUMER":       5,
}
var ReadConsistencyType_name = map[int32]string{
    0:  "CONSISTENT",
    1:  "READ_UNCOMMITTED",
    2:  "INCONSISTENT",
}
var ReadConsistencyType_value = map[string]int32{
    "CONSISTENT":       0,
    "READ_UNCOMMITTED": 1,
    "INCONSISTENT":     2,
}
var ReplicaChangeType_name = map[int32]string{
    0:  "ADD_REPLICA",
    1:  "REMOVE_REPLICA",
}
var ReplicaChangeType_value = map[string]int32{
    "ADD_REPLICA":    0,
    "REMOVE_REPLICA": 1,
}
var ReplicaType_name = map[int32]string{
    0:  "VOTER_FULL",
    2:  "VOTER_INCOMING",
    3:  "VOTER_OUTGOING",
    1:  "LEARNER",
}
var ReplicaType_value = map[string]int32{
    "VOTER_FULL":     0,
    "VOTER_INCOMING": 2,
    "VOTER_OUTGOING": 3,
    "LEARNER":        1,
}
var ResponseHeader_ResumeReason_name = map[int32]string{
    0:  "RESUME_UNKNOWN",
    1:  "RESUME_KEY_LIMIT",
    2:  "RESUME_RANGE_BOUNDARY",
}
var ResponseHeader_ResumeReason_value = map[string]int32{
    "RESUME_UNKNOWN":        0,
    "RESUME_KEY_LIMIT":      1,
    "RESUME_RANGE_BOUNDARY": 2,
}
var ScanFormat_name = map[int32]string{
    0:  "KEY_VALUES",
    1:  "BATCH_RESPONSE",
}
var ScanFormat_value = map[string]int32{
    "KEY_VALUES":     0,
    "BATCH_RESPONSE": 1,
}
var TransactionAbortedReason_name = map[int32]string{
    0:  "ABORT_REASON_UNKNOWN",
    1:  "ABORT_REASON_ABORTED_RECORD_FOUND",
    3:  "ABORT_REASON_CLIENT_REJECT",
    4:  "ABORT_REASON_PUSHER_ABORTED",
    5:  "ABORT_REASON_ABORT_SPAN",
    6:  "ABORT_REASON_ALREADY_COMMITTED_OR_ROLLED_BACK_POSSIBLE_REPLAY",
    7:  "ABORT_REASON_TIMESTAMP_CACHE_REJECTED_POSSIBLE_REPLAY",
}
var TransactionAbortedReason_value = map[string]int32{
    "ABORT_REASON_UNKNOWN":                                          0,
    "ABORT_REASON_ABORTED_RECORD_FOUND":                             1,
    "ABORT_REASON_CLIENT_REJECT":                                    3,
    "ABORT_REASON_PUSHER_ABORTED":                                   4,
    "ABORT_REASON_ABORT_SPAN":                                       5,
    "ABORT_REASON_ALREADY_COMMITTED_OR_ROLLED_BACK_POSSIBLE_REPLAY": 6,
    "ABORT_REASON_TIMESTAMP_CACHE_REJECTED_POSSIBLE_REPLAY":         7,
}
var TransactionRestart_name = map[int32]string{
    0:  "NONE",
    1:  "BACKOFF",
    2:  "IMMEDIATE",
}
var TransactionRestart_value = map[string]int32{
    "NONE":      0,
    "BACKOFF":   1,
    "IMMEDIATE": 2,
}
var TransactionRetryReason_name = map[int32]string{
    0:  "RETRY_REASON_UNKNOWN",
    1:  "RETRY_WRITE_TOO_OLD",
    3:  "RETRY_SERIALIZABLE",
    4:  "RETRY_POSSIBLE_REPLAY",
    5:  "RETRY_ASYNC_WRITE_FAILURE",
    6:  "RETRY_COMMIT_DEADLINE_EXCEEDED",
}
var TransactionRetryReason_value = map[string]int32{
    "RETRY_REASON_UNKNOWN":           0,
    "RETRY_WRITE_TOO_OLD":            1,
    "RETRY_SERIALIZABLE":             3,
    "RETRY_POSSIBLE_REPLAY":          4,
    "RETRY_ASYNC_WRITE_FAILURE":      5,
    "RETRY_COMMIT_DEADLINE_EXCEEDED": 6,
}
var TransactionStatusError_Reason_name = map[int32]string{
    0:  "REASON_UNKNOWN",
    2:  "REASON_TXN_COMMITTED",
}
var TransactionStatusError_Reason_value = map[string]int32{
    "REASON_UNKNOWN":       0,
    "REASON_TXN_COMMITTED": 2,
}
var TransactionStatus_name = map[int32]string{
    0:  "PENDING",
    3:  "STAGING",
    1:  "COMMITTED",
    2:  "ABORTED",
}
var TransactionStatus_value = map[string]int32{
    "PENDING":   0,
    "STAGING":   3,
    "COMMITTED": 1,
    "ABORTED":   2,
}
var ValueType_name = map[int32]string{
    0:   "UNKNOWN",
    1:   "INT",
    2:   "FLOAT",
    3:   "BYTES",
    8:   "DELIMITED_BYTES",
    4:   "TIME",
    5:   "DECIMAL",
    9:   "DELIMITED_DECIMAL",
    6:   "DURATION",
    10:  "TUPLE",
    11:  "BITARRAY",
    100: "TIMESERIES",
}
var ValueType_value = map[string]int32{
    "UNKNOWN":           0,
    "INT":               1,
    "FLOAT":             2,
    "BYTES":             3,
    "DELIMITED_BYTES":   8,
    "TIME":              4,
    "DECIMAL":           5,
    "DELIMITED_DECIMAL": 9,
    "DURATION":          6,
    "TUPLE":             10,
    "BITARRAY":          11,
    "TIMESERIES":        100,
}

func BytesNext Uses

func BytesNext(b []byte) []byte

BytesNext returns the next possible byte slice, using the extra capacity of the provided slice if possible, and if not, appending an \x00.

func CanBackpressure Uses

func CanBackpressure(args Request) bool

CanBackpressure returns whether the command can be backpressured when waiting for a Range to split after it has grown too large.

func ConsultsTimestampCache Uses

func ConsultsTimestampCache(args Request) bool

ConsultsTimestampCache returns whether the command must consult the timestamp cache to determine whether a mutation is safe at a proposed timestamp or needs to move to a higher timestamp to avoid re-writing history.

func ErrorUnexpectedlySet Uses

func ErrorUnexpectedlySet(culprit, response interface{}) string

ErrorUnexpectedlySet creates a string to panic with when a response (typically a roachpb.BatchResponse) unexpectedly has Error set in its response header.

func IsRange Uses

func IsRange(args Request) bool

IsRange returns true if the command is range-based and must include a start and an end key.

func IsReadAndWrite Uses

func IsReadAndWrite(args Request) bool

IsReadAndWrite returns true if the request both reads and writes (such as conditional puts).

func IsReadOnly Uses

func IsReadOnly(args Request) bool

IsReadOnly returns true iff the request is read-only.

func IsTransactionWrite Uses

func IsTransactionWrite(args Request) bool

IsTransactionWrite returns true if the request produces write intents when used within a transaction.

func IsTransactional Uses

func IsTransactional(args Request) bool

IsTransactional returns true if the request may be part of a transaction.

func MakePriority Uses

func MakePriority(userPriority UserPriority) enginepb.TxnPriority

MakePriority generates a random priority value, biased by the specified userPriority. If userPriority=100, the random priority will be 100x more likely to be greater than if userPriority=1. If userPriority = 0.1, the random priority will be 1/10th as likely to be greater than if userPriority=NormalUserPriority ( = 1). Balance is achieved when userPriority=NormalUserPriority, in which case the priority chosen is unbiased.

If userPriority is less than or equal to MinUserPriority, returns MinTxnPriority; if greater than or equal to MaxUserPriority, returns MaxTxnPriority. If userPriority is 0, returns NormalUserPriority.

func NeedsRefresh Uses

func NeedsRefresh(args Request) bool

NeedsRefresh returns whether the command must be refreshed in order to avoid client-side retries on serializable transactions.

func RegisterInternalServer Uses

func RegisterInternalServer(s *grpc.Server, srv InternalServer)

func UpdatesTimestampCache Uses

func UpdatesTimestampCache(args Request) bool

UpdatesTimestampCache returns whether the command must update the read timestamp cache in order to set a low water mark for the timestamp at which mutations to overlapping key(s) can write such that they don't re-write history.

func UpdatesTimestampCacheOnError Uses

func UpdatesTimestampCacheOnError(args Request) bool

UpdatesTimestampCacheOnError returns whether the command must update the timestamp cache even on error, as in some cases the data which was read is returned (e.g. ConditionalPut ConditionFailedError).

func UpdatesWriteTimestampCache Uses

func UpdatesWriteTimestampCache(args Request) bool

UpdatesWriteTimestampCache returns whether the command must update the write timestamp cache.

type AbortSpanEntry Uses

type AbortSpanEntry struct {
    // The key of the associated transaction.
    Key Key `protobuf:"bytes,1,opt,name=key,proto3,casttype=Key" json:"key,omitempty"`
    // The candidate commit timestamp the transaction record held at the time
    // it was aborted.
    Timestamp hlc.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp"`
    // The priority of the transaction.
    Priority github_com_cockroachdb_cockroach_pkg_storage_engine_enginepb.TxnPriority `protobuf:"varint,3,opt,name=priority,proto3,casttype=github.com/cockroachdb/cockroach/pkg/storage/engine/enginepb.TxnPriority" json:"priority,omitempty"`
}

AbortSpanEntry contains information about a transaction which has been aborted. It's written to a range's AbortSpan if the range may have contained intents of the aborted txn. In the event that the same transaction attempts to read keys it may have written previously, this entry informs the transaction that it has aborted and must start fresh with an updated priority.

func NewPopulatedAbortSpanEntry Uses

func NewPopulatedAbortSpanEntry(r randyData, easy bool) *AbortSpanEntry

func (*AbortSpanEntry) Descriptor Uses

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

func (*AbortSpanEntry) Equal Uses

func (this *AbortSpanEntry) Equal(that interface{}) bool

func (*AbortSpanEntry) Marshal Uses

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

func (*AbortSpanEntry) MarshalTo Uses

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

func (*AbortSpanEntry) ProtoMessage Uses

func (*AbortSpanEntry) ProtoMessage()

func (*AbortSpanEntry) Reset Uses

func (m *AbortSpanEntry) Reset()

func (*AbortSpanEntry) Size Uses

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

func (*AbortSpanEntry) String Uses

func (m *AbortSpanEntry) String() string

func (*AbortSpanEntry) Unmarshal Uses

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

func (*AbortSpanEntry) XXX_DiscardUnknown Uses

func (m *AbortSpanEntry) XXX_DiscardUnknown()

func (*AbortSpanEntry) XXX_Marshal Uses

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

func (*AbortSpanEntry) XXX_Merge Uses

func (dst *AbortSpanEntry) XXX_Merge(src proto.Message)

func (*AbortSpanEntry) XXX_Size Uses

func (m *AbortSpanEntry) XXX_Size() int

func (*AbortSpanEntry) XXX_Unmarshal Uses

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

type AddSSTableRequest Uses

type AddSSTableRequest struct {
    RequestHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
    Data          []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
    // If set, indicates that AddSSTable will not allow ingestion of keys which
    // shadow already existing key entries. This disallows any key slice overlap
    // regardless of the timestamps.
    DisallowShadowing bool `protobuf:"varint,3,opt,name=disallow_shadowing,json=disallowShadowing,proto3" json:"disallow_shadowing,omitempty"`
    // MVCCStats, if set, is the MVCCStats for the contents of this SSTable and is
    // used as-is during evaluation of the AddSSTable command to update the range
    // MVCCStats, instead of computing the stats for the SSTable by iterating it.
    // Including these stats can make the evaluation of AddSSTable much cheaper.
    MVCCStats *enginepb.MVCCStats `protobuf:"bytes,4,opt,name=mvcc_stats,json=mvccStats,proto3" json:"mvcc_stats,omitempty"`
}

AddSSTableRequest is arguments to the AddSSTable() method, to link a file into the RocksDB log-structured merge-tree.

func (*AddSSTableRequest) Descriptor Uses

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

func (*AddSSTableRequest) Equal Uses

func (this *AddSSTableRequest) Equal(that interface{}) bool

func (*AddSSTableRequest) Marshal Uses

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

func (*AddSSTableRequest) MarshalTo Uses

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

func (*AddSSTableRequest) Method Uses

func (*AddSSTableRequest) Method() Method

Method implements the Request interface.

func (*AddSSTableRequest) ProtoMessage Uses

func (*AddSSTableRequest) ProtoMessage()

func (*AddSSTableRequest) Reset Uses

func (m *AddSSTableRequest) Reset()

func (*AddSSTableRequest) ShallowCopy Uses

func (r *AddSSTableRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AddSSTableRequest) Size Uses

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

func (*AddSSTableRequest) String Uses

func (m *AddSSTableRequest) String() string

func (*AddSSTableRequest) Unmarshal Uses

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

func (*AddSSTableRequest) XXX_DiscardUnknown Uses

func (m *AddSSTableRequest) XXX_DiscardUnknown()

func (*AddSSTableRequest) XXX_Marshal Uses

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

func (*AddSSTableRequest) XXX_Merge Uses

func (dst *AddSSTableRequest) XXX_Merge(src proto.Message)

func (*AddSSTableRequest) XXX_Size Uses

func (m *AddSSTableRequest) XXX_Size() int

func (*AddSSTableRequest) XXX_Unmarshal Uses

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

type AddSSTableResponse Uses

type AddSSTableResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
}

AddSSTableResponse is the response to a AddSSTable() operation.

func (*AddSSTableResponse) Descriptor Uses

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

func (*AddSSTableResponse) Marshal Uses

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

func (*AddSSTableResponse) MarshalTo Uses

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

func (*AddSSTableResponse) ProtoMessage Uses

func (*AddSSTableResponse) ProtoMessage()

func (*AddSSTableResponse) Reset Uses

func (m *AddSSTableResponse) Reset()

func (*AddSSTableResponse) Size Uses

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

func (*AddSSTableResponse) String Uses

func (m *AddSSTableResponse) String() string

func (*AddSSTableResponse) Unmarshal Uses

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

func (*AddSSTableResponse) XXX_DiscardUnknown Uses

func (m *AddSSTableResponse) XXX_DiscardUnknown()

func (*AddSSTableResponse) XXX_Marshal Uses

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

func (*AddSSTableResponse) XXX_Merge Uses

func (dst *AddSSTableResponse) XXX_Merge(src proto.Message)

func (*AddSSTableResponse) XXX_Size Uses

func (m *AddSSTableResponse) XXX_Size() int

func (*AddSSTableResponse) XXX_Unmarshal Uses

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

type AdminChangeReplicasRequest Uses

type AdminChangeReplicasRequest struct {
    RequestHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
    // Never access directly: use .Changes()
    //
    // TODO(tbg): remove in 20.1
    DeprecatedChangeType ReplicaChangeType `protobuf:"varint,2,opt,name=deprecated_change_type,json=deprecatedChangeType,proto3,enum=cockroach.roachpb.ReplicaChangeType" json:"deprecated_change_type,omitempty"`
    // Never access directly: use .Changes()
    //
    // TODO(tbg): remove in 20.1
    DeprecatedTargets []ReplicationTarget `protobuf:"bytes,3,rep,name=deprecated_targets,json=deprecatedTargets,proto3" json:"deprecated_targets"`
    // ExpDesc is the expected current range descriptor to modify. If the range
    // descriptor is not identical to ExpDesc for the request will fail.
    //
    // If there is more than one change specified in targets, this expectation
    // will be applied to the first change and subsequent changes will use the
    // resultant descriptor from successfully applying the previous change.
    // If a change with more than one target occurs concurrently with another
    // it is possible that an error will occur after partial application of the
    // change. Changes are applied in the order they appear in the request.
    ExpDesc RangeDescriptor `protobuf:"bytes,4,opt,name=exp_desc,json=expDesc,proto3" json:"exp_desc"`
    // The changes to apply to exp_desc. Never access directly: use .Changes().
    //
    // TODO(tbg): rename to 'changes' in 20.1 and remove Changes().
    InternalChanges []ReplicationChange `protobuf:"bytes,5,rep,name=internal_changes,json=internalChanges,proto3" json:"internal_changes"`
}

An AdminChangeReplicasRequest is the argument to the AdminChangeReplicas() method. A change replicas operation allows adding or removing a set of replicas for a range.

func (*AdminChangeReplicasRequest) AddChanges Uses

func (acrr *AdminChangeReplicasRequest) AddChanges(chgs ...ReplicationChange)

AddChanges adds a batch of changes to the request in a backwards-compatible way.

func (*AdminChangeReplicasRequest) Changes Uses

func (acrr *AdminChangeReplicasRequest) Changes() []ReplicationChange

Changes returns the changes requested by this AdminChangeReplicasRequest, taking the deprecated method of doing so into account.

func (*AdminChangeReplicasRequest) Descriptor Uses

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

func (*AdminChangeReplicasRequest) Equal Uses

func (this *AdminChangeReplicasRequest) Equal(that interface{}) bool

func (*AdminChangeReplicasRequest) Marshal Uses

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

func (*AdminChangeReplicasRequest) MarshalTo Uses

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

func (*AdminChangeReplicasRequest) Method Uses

func (*AdminChangeReplicasRequest) Method() Method

Method implements the Request interface.

func (*AdminChangeReplicasRequest) ProtoMessage Uses

func (*AdminChangeReplicasRequest) ProtoMessage()

func (*AdminChangeReplicasRequest) Reset Uses

func (m *AdminChangeReplicasRequest) Reset()

func (*AdminChangeReplicasRequest) ShallowCopy Uses

func (acrr *AdminChangeReplicasRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AdminChangeReplicasRequest) Size Uses

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

func (*AdminChangeReplicasRequest) String Uses

func (m *AdminChangeReplicasRequest) String() string

func (*AdminChangeReplicasRequest) Unmarshal Uses

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

func (*AdminChangeReplicasRequest) XXX_DiscardUnknown Uses

func (m *AdminChangeReplicasRequest) XXX_DiscardUnknown()

func (*AdminChangeReplicasRequest) XXX_Marshal Uses

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

func (*AdminChangeReplicasRequest) XXX_Merge Uses

func (dst *AdminChangeReplicasRequest) XXX_Merge(src proto.Message)

func (*AdminChangeReplicasRequest) XXX_Size Uses

func (m *AdminChangeReplicasRequest) XXX_Size() int

func (*AdminChangeReplicasRequest) XXX_Unmarshal Uses

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

type AdminChangeReplicasResponse Uses

type AdminChangeReplicasResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
    // Desc is the value of the range descriptor upon success.
    Desc RangeDescriptor `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc"`
}

func (*AdminChangeReplicasResponse) Descriptor Uses

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

func (*AdminChangeReplicasResponse) Marshal Uses

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

func (*AdminChangeReplicasResponse) MarshalTo Uses

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

func (*AdminChangeReplicasResponse) ProtoMessage Uses

func (*AdminChangeReplicasResponse) ProtoMessage()

func (*AdminChangeReplicasResponse) Reset Uses

func (m *AdminChangeReplicasResponse) Reset()

func (*AdminChangeReplicasResponse) Size Uses

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

func (*AdminChangeReplicasResponse) String Uses

func (m *AdminChangeReplicasResponse) String() string

func (*AdminChangeReplicasResponse) Unmarshal Uses

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

func (*AdminChangeReplicasResponse) XXX_DiscardUnknown Uses

func (m *AdminChangeReplicasResponse) XXX_DiscardUnknown()

func (*AdminChangeReplicasResponse) XXX_Marshal Uses

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

func (*AdminChangeReplicasResponse) XXX_Merge Uses

func (dst *AdminChangeReplicasResponse) XXX_Merge(src proto.Message)

func (*AdminChangeReplicasResponse) XXX_Size Uses

func (m *AdminChangeReplicasResponse) XXX_Size() int

func (*AdminChangeReplicasResponse) XXX_Unmarshal Uses

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

type AdminMergeRequest Uses

type AdminMergeRequest struct {
    RequestHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
}

An AdminMergeRequest is the argument to the AdminMerge() method. A merge is performed by calling AdminMerge on the left-hand range of two consecutive ranges (i.e. the range which contains keys which sort first). This range will be the subsuming range and the right hand range will be subsumed. After the merge operation, the subsumed range will no longer exist and the subsuming range will now encompass all keys from its original start key to the end key of the subsumed range. If AdminMerge is called on the final range in the key space, it is a noop. The request must be addressed to the start key of the left hand side.

func (*AdminMergeRequest) Descriptor Uses

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

func (*AdminMergeRequest) Equal Uses

func (this *AdminMergeRequest) Equal(that interface{}) bool

func (*AdminMergeRequest) Marshal Uses

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

func (*AdminMergeRequest) MarshalTo Uses

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

func (*AdminMergeRequest) Method Uses

func (*AdminMergeRequest) Method() Method

Method implements the Request interface.

func (*AdminMergeRequest) ProtoMessage Uses

func (*AdminMergeRequest) ProtoMessage()

func (*AdminMergeRequest) Reset Uses

func (m *AdminMergeRequest) Reset()

func (*AdminMergeRequest) ShallowCopy Uses

func (amr *AdminMergeRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AdminMergeRequest) Size Uses

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

func (*AdminMergeRequest) String Uses

func (m *AdminMergeRequest) String() string

func (*AdminMergeRequest) Unmarshal Uses

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

func (*AdminMergeRequest) XXX_DiscardUnknown Uses

func (m *AdminMergeRequest) XXX_DiscardUnknown()

func (*AdminMergeRequest) XXX_Marshal Uses

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

func (*AdminMergeRequest) XXX_Merge Uses

func (dst *AdminMergeRequest) XXX_Merge(src proto.Message)

func (*AdminMergeRequest) XXX_Size Uses

func (m *AdminMergeRequest) XXX_Size() int

func (*AdminMergeRequest) XXX_Unmarshal Uses

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

type AdminMergeResponse Uses

type AdminMergeResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
}

An AdminMergeResponse is the return value from the AdminMerge() method.

func (*AdminMergeResponse) Descriptor Uses

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

func (*AdminMergeResponse) Marshal Uses

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

func (*AdminMergeResponse) MarshalTo Uses

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

func (*AdminMergeResponse) ProtoMessage Uses

func (*AdminMergeResponse) ProtoMessage()

func (*AdminMergeResponse) Reset Uses

func (m *AdminMergeResponse) Reset()

func (*AdminMergeResponse) Size Uses

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

func (*AdminMergeResponse) String Uses

func (m *AdminMergeResponse) String() string

func (*AdminMergeResponse) Unmarshal Uses

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

func (*AdminMergeResponse) XXX_DiscardUnknown Uses

func (m *AdminMergeResponse) XXX_DiscardUnknown()

func (*AdminMergeResponse) XXX_Marshal Uses

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

func (*AdminMergeResponse) XXX_Merge Uses

func (dst *AdminMergeResponse) XXX_Merge(src proto.Message)

func (*AdminMergeResponse) XXX_Size Uses

func (m *AdminMergeResponse) XXX_Size() int

func (*AdminMergeResponse) XXX_Unmarshal Uses

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

type AdminRelocateRangeRequest Uses

type AdminRelocateRangeRequest struct {
    RequestHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
    Targets       []ReplicationTarget `protobuf:"bytes,2,rep,name=targets,proto3" json:"targets"`
}

An AdminRelocateRangeRequest is the argument to the AdminRelocateRange() method. Relocates the replicas for a range to the specified target stores. The first store in the list of targets becomes the new leaseholder.

func (*AdminRelocateRangeRequest) Descriptor Uses

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

func (*AdminRelocateRangeRequest) Equal Uses

func (this *AdminRelocateRangeRequest) Equal(that interface{}) bool

func (*AdminRelocateRangeRequest) Marshal Uses

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

func (*AdminRelocateRangeRequest) MarshalTo Uses

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

func (*AdminRelocateRangeRequest) Method Uses

func (*AdminRelocateRangeRequest) Method() Method

Method implements the Request interface.

func (*AdminRelocateRangeRequest) ProtoMessage Uses

func (*AdminRelocateRangeRequest) ProtoMessage()

func (*AdminRelocateRangeRequest) Reset Uses

func (m *AdminRelocateRangeRequest) Reset()

func (*AdminRelocateRangeRequest) ShallowCopy Uses

func (acrr *AdminRelocateRangeRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AdminRelocateRangeRequest) Size Uses

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

func (*AdminRelocateRangeRequest) String Uses

func (m *AdminRelocateRangeRequest) String() string

func (*AdminRelocateRangeRequest) Unmarshal Uses

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

func (*AdminRelocateRangeRequest) XXX_DiscardUnknown Uses

func (m *AdminRelocateRangeRequest) XXX_DiscardUnknown()

func (*AdminRelocateRangeRequest) XXX_Marshal Uses

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

func (*AdminRelocateRangeRequest) XXX_Merge Uses

func (dst *AdminRelocateRangeRequest) XXX_Merge(src proto.Message)

func (*AdminRelocateRangeRequest) XXX_Size Uses

func (m *AdminRelocateRangeRequest) XXX_Size() int

func (*AdminRelocateRangeRequest) XXX_Unmarshal Uses

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

type AdminRelocateRangeResponse Uses

type AdminRelocateRangeResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
}

func (*AdminRelocateRangeResponse) Descriptor Uses

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

func (*AdminRelocateRangeResponse) Marshal Uses

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

func (*AdminRelocateRangeResponse) MarshalTo Uses

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

func (*AdminRelocateRangeResponse) ProtoMessage Uses

func (*AdminRelocateRangeResponse) ProtoMessage()

func (*AdminRelocateRangeResponse) Reset Uses

func (m *AdminRelocateRangeResponse) Reset()

func (*AdminRelocateRangeResponse) Size Uses

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

func (*AdminRelocateRangeResponse) String Uses

func (m *AdminRelocateRangeResponse) String() string

func (*AdminRelocateRangeResponse) Unmarshal Uses

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

func (*AdminRelocateRangeResponse) XXX_DiscardUnknown Uses

func (m *AdminRelocateRangeResponse) XXX_DiscardUnknown()

func (*AdminRelocateRangeResponse) XXX_Marshal Uses

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

func (*AdminRelocateRangeResponse) XXX_Merge Uses

func (dst *AdminRelocateRangeResponse) XXX_Merge(src proto.Message)

func (*AdminRelocateRangeResponse) XXX_Size Uses

func (m *AdminRelocateRangeResponse) XXX_Size() int

func (*AdminRelocateRangeResponse) XXX_Unmarshal Uses

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

type AdminScatterRequest Uses

type AdminScatterRequest struct {
    RequestHeader   `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
    RandomizeLeases bool `protobuf:"varint,2,opt,name=randomize_leases,json=randomizeLeases,proto3" json:"randomize_leases,omitempty"`
}

AdminScatterRequest is the argument to the AdminScatter() method, which moves replicas and leaseholders for a selection of ranges. Scatter is best-effort; ranges that cannot be moved will include an error detail in the response and won't fail the request.

func (*AdminScatterRequest) Descriptor Uses

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

func (*AdminScatterRequest) Equal Uses

func (this *AdminScatterRequest) Equal(that interface{}) bool

func (*AdminScatterRequest) Marshal Uses

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

func (*AdminScatterRequest) MarshalTo Uses

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

func (*AdminScatterRequest) Method Uses

func (*AdminScatterRequest) Method() Method

Method implements the Request interface.

func (*AdminScatterRequest) ProtoMessage Uses

func (*AdminScatterRequest) ProtoMessage()

func (*AdminScatterRequest) Reset Uses

func (m *AdminScatterRequest) Reset()

func (*AdminScatterRequest) ShallowCopy Uses

func (r *AdminScatterRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AdminScatterRequest) Size Uses

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

func (*AdminScatterRequest) String Uses

func (m *AdminScatterRequest) String() string

func (*AdminScatterRequest) Unmarshal Uses

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

func (*AdminScatterRequest) XXX_DiscardUnknown Uses

func (m *AdminScatterRequest) XXX_DiscardUnknown()

func (*AdminScatterRequest) XXX_Marshal Uses

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

func (*AdminScatterRequest) XXX_Merge Uses

func (dst *AdminScatterRequest) XXX_Merge(src proto.Message)

func (*AdminScatterRequest) XXX_Size Uses

func (m *AdminScatterRequest) XXX_Size() int

func (*AdminScatterRequest) XXX_Unmarshal Uses

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

type AdminScatterResponse Uses

type AdminScatterResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
    Ranges         []AdminScatterResponse_Range `protobuf:"bytes,2,rep,name=ranges,proto3" json:"ranges"`
}

ScatterResponse is the response to a Scatter() operation.

func (*AdminScatterResponse) Descriptor Uses

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

func (*AdminScatterResponse) Marshal Uses

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

func (*AdminScatterResponse) MarshalTo Uses

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

func (*AdminScatterResponse) ProtoMessage Uses

func (*AdminScatterResponse) ProtoMessage()

func (*AdminScatterResponse) Reset Uses

func (m *AdminScatterResponse) Reset()

func (*AdminScatterResponse) Size Uses

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

func (*AdminScatterResponse) String Uses

func (m *AdminScatterResponse) String() string

func (*AdminScatterResponse) Unmarshal Uses

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

func (*AdminScatterResponse) XXX_DiscardUnknown Uses

func (m *AdminScatterResponse) XXX_DiscardUnknown()

func (*AdminScatterResponse) XXX_Marshal Uses

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

func (*AdminScatterResponse) XXX_Merge Uses

func (dst *AdminScatterResponse) XXX_Merge(src proto.Message)

func (*AdminScatterResponse) XXX_Size Uses

func (m *AdminScatterResponse) XXX_Size() int

func (*AdminScatterResponse) XXX_Unmarshal Uses

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

type AdminScatterResponse_Range Uses

type AdminScatterResponse_Range struct {
    Span Span `protobuf:"bytes,1,opt,name=span,proto3" json:"span"`
}

func (*AdminScatterResponse_Range) Descriptor Uses

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

func (*AdminScatterResponse_Range) Marshal Uses

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

func (*AdminScatterResponse_Range) MarshalTo Uses

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

func (*AdminScatterResponse_Range) ProtoMessage Uses

func (*AdminScatterResponse_Range) ProtoMessage()

func (*AdminScatterResponse_Range) Reset Uses

func (m *AdminScatterResponse_Range) Reset()

func (*AdminScatterResponse_Range) Size Uses

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

func (*AdminScatterResponse_Range) String Uses

func (m *AdminScatterResponse_Range) String() string

func (*AdminScatterResponse_Range) Unmarshal Uses

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

func (*AdminScatterResponse_Range) XXX_DiscardUnknown Uses

func (m *AdminScatterResponse_Range) XXX_DiscardUnknown()

func (*AdminScatterResponse_Range) XXX_Marshal Uses

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

func (*AdminScatterResponse_Range) XXX_Merge Uses

func (dst *AdminScatterResponse_Range) XXX_Merge(src proto.Message)

func (*AdminScatterResponse_Range) XXX_Size Uses

func (m *AdminScatterResponse_Range) XXX_Size() int

func (*AdminScatterResponse_Range) XXX_Unmarshal Uses

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

type AdminSplitRequest Uses

type AdminSplitRequest struct {
    RequestHeader  `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
    SplitKey       Key           `protobuf:"bytes,2,opt,name=split_key,json=splitKey,proto3,casttype=Key" json:"split_key,omitempty"`
    ExpirationTime hlc.Timestamp `protobuf:"bytes,4,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time"`
}

An AdminSplitRequest is the argument to the AdminSplit() method. The existing range which contains header.key is split by split_key. If split_key is not specified, then this method will determine a split key that is roughly halfway through the range. The existing range is resized to cover only its start key to the split key. The new range created by the split starts at the split key and extends to the original range's end key. If split_key is known, header.key should also be set to split_key.

New range IDs for each of the split range's replica and a new Raft ID are generated by the operation. Split requests are done in the context of a distributed transaction which updates range addressing records, range metadata and finally, provides a commit trigger to update bookkeeping and instantiate the new range on commit.

The new range contains range replicas located on the same stores; no range data is moved during this operation. The split can be thought of as a mostly logical operation, though some other metadata (e.g. abort span and range stats must be copied or recomputed).

expiration_time represents the time that this split expires. Any split that is not expired will not be considered for automatic merging by the merge queue. Any split requested by the split queue will have an expiration time of hlc.Timestamp{} (I.E. The zero timestamp so they are always eligible for automatic merging).

func (*AdminSplitRequest) Descriptor Uses

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

func (*AdminSplitRequest) Equal Uses

func (this *AdminSplitRequest) Equal(that interface{}) bool

func (*AdminSplitRequest) Marshal Uses

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

func (*AdminSplitRequest) MarshalTo Uses

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

func (*AdminSplitRequest) Method Uses

func (*AdminSplitRequest) Method() Method

Method implements the Request interface.

func (*AdminSplitRequest) ProtoMessage Uses

func (*AdminSplitRequest) ProtoMessage()

func (*AdminSplitRequest) Reset Uses

func (m *AdminSplitRequest) Reset()

func (*AdminSplitRequest) ShallowCopy Uses

func (asr *AdminSplitRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AdminSplitRequest) Size Uses

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

func (*AdminSplitRequest) String Uses

func (m *AdminSplitRequest) String() string

func (*AdminSplitRequest) Unmarshal Uses

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

func (*AdminSplitRequest) XXX_DiscardUnknown Uses

func (m *AdminSplitRequest) XXX_DiscardUnknown()

func (*AdminSplitRequest) XXX_Marshal Uses

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

func (*AdminSplitRequest) XXX_Merge Uses

func (dst *AdminSplitRequest) XXX_Merge(src proto.Message)

func (*AdminSplitRequest) XXX_Size Uses

func (m *AdminSplitRequest) XXX_Size() int

func (*AdminSplitRequest) XXX_Unmarshal Uses

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

type AdminSplitResponse Uses

type AdminSplitResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
}

An AdminSplitResponse is the return value from the AdminSplit() method.

func (*AdminSplitResponse) Descriptor Uses

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

func (*AdminSplitResponse) Marshal Uses

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

func (*AdminSplitResponse) MarshalTo Uses

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

func (*AdminSplitResponse) ProtoMessage Uses

func (*AdminSplitResponse) ProtoMessage()

func (*AdminSplitResponse) Reset Uses

func (m *AdminSplitResponse) Reset()

func (*AdminSplitResponse) Size Uses

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

func (*AdminSplitResponse) String Uses

func (m *AdminSplitResponse) String() string

func (*AdminSplitResponse) Unmarshal Uses

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

func (*AdminSplitResponse) XXX_DiscardUnknown Uses

func (m *AdminSplitResponse) XXX_DiscardUnknown()

func (*AdminSplitResponse) XXX_Marshal Uses

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

func (*AdminSplitResponse) XXX_Merge Uses

func (dst *AdminSplitResponse) XXX_Merge(src proto.Message)

func (*AdminSplitResponse) XXX_Size Uses

func (m *AdminSplitResponse) XXX_Size() int

func (*AdminSplitResponse) XXX_Unmarshal Uses

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

type AdminTransferLeaseRequest Uses

type AdminTransferLeaseRequest struct {
    RequestHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
    Target        StoreID `protobuf:"varint,2,opt,name=target,proto3,casttype=StoreID" json:"target,omitempty"`
}

An AdminTransferLeaseRequest is the argument to the AdminTransferLease() method. A lease transfer allows an external entity to control the lease holder for a range. The target of the lease transfer needs to be a valid replica of the range.

func (*AdminTransferLeaseRequest) Descriptor Uses

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

func (*AdminTransferLeaseRequest) Equal Uses

func (this *AdminTransferLeaseRequest) Equal(that interface{}) bool

func (*AdminTransferLeaseRequest) Marshal Uses

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

func (*AdminTransferLeaseRequest) MarshalTo Uses

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

func (*AdminTransferLeaseRequest) Method Uses

func (*AdminTransferLeaseRequest) Method() Method

Method implements the Request interface.

func (*AdminTransferLeaseRequest) ProtoMessage Uses

func (*AdminTransferLeaseRequest) ProtoMessage()

func (*AdminTransferLeaseRequest) Reset Uses

func (m *AdminTransferLeaseRequest) Reset()

func (*AdminTransferLeaseRequest) ShallowCopy Uses

func (atlr *AdminTransferLeaseRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AdminTransferLeaseRequest) Size Uses

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

func (*AdminTransferLeaseRequest) String Uses

func (m *AdminTransferLeaseRequest) String() string

func (*AdminTransferLeaseRequest) Unmarshal Uses

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

func (*AdminTransferLeaseRequest) XXX_DiscardUnknown Uses

func (m *AdminTransferLeaseRequest) XXX_DiscardUnknown()

func (*AdminTransferLeaseRequest) XXX_Marshal Uses

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

func (*AdminTransferLeaseRequest) XXX_Merge Uses

func (dst *AdminTransferLeaseRequest) XXX_Merge(src proto.Message)

func (*AdminTransferLeaseRequest) XXX_Size Uses

func (m *AdminTransferLeaseRequest) XXX_Size() int

func (*AdminTransferLeaseRequest) XXX_Unmarshal Uses

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

type AdminTransferLeaseResponse Uses

type AdminTransferLeaseResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
}

func (*AdminTransferLeaseResponse) Descriptor Uses

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

func (*AdminTransferLeaseResponse) Marshal Uses

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

func (*AdminTransferLeaseResponse) MarshalTo Uses

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

func (*AdminTransferLeaseResponse) ProtoMessage Uses

func (*AdminTransferLeaseResponse) ProtoMessage()

func (*AdminTransferLeaseResponse) Reset Uses

func (m *AdminTransferLeaseResponse) Reset()

func (*AdminTransferLeaseResponse) Size Uses

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

func (*AdminTransferLeaseResponse) String Uses

func (m *AdminTransferLeaseResponse) String() string

func (*AdminTransferLeaseResponse) Unmarshal Uses

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

func (*AdminTransferLeaseResponse) XXX_DiscardUnknown Uses

func (m *AdminTransferLeaseResponse) XXX_DiscardUnknown()

func (*AdminTransferLeaseResponse) XXX_Marshal Uses

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

func (*AdminTransferLeaseResponse) XXX_Merge Uses

func (dst *AdminTransferLeaseResponse) XXX_Merge(src proto.Message)

func (*AdminTransferLeaseResponse) XXX_Size Uses

func (m *AdminTransferLeaseResponse) XXX_Size() int

func (*AdminTransferLeaseResponse) XXX_Unmarshal Uses

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

type AdminUnsplitRequest Uses

type AdminUnsplitRequest struct {
    RequestHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
}

An AdminUnsplitRequest is the argument to the AdminUnsplit() method. The sticky bit of the existing range whose starting key is header.key is removed.

Ranges that do not have the sticky bit set are eligible for automatic merging.

func (*AdminUnsplitRequest) Descriptor Uses

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

func (*AdminUnsplitRequest) Equal Uses

func (this *AdminUnsplitRequest) Equal(that interface{}) bool

func (*AdminUnsplitRequest) Marshal Uses

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

func (*AdminUnsplitRequest) MarshalTo Uses

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

func (*AdminUnsplitRequest) Method Uses

func (*AdminUnsplitRequest) Method() Method

Method implements the Request interface.

func (*AdminUnsplitRequest) ProtoMessage Uses

func (*AdminUnsplitRequest) ProtoMessage()

func (*AdminUnsplitRequest) Reset Uses

func (m *AdminUnsplitRequest) Reset()

func (*AdminUnsplitRequest) ShallowCopy Uses

func (aur *AdminUnsplitRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*AdminUnsplitRequest) Size Uses

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

func (*AdminUnsplitRequest) String Uses

func (m *AdminUnsplitRequest) String() string

func (*AdminUnsplitRequest) Unmarshal Uses

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

func (*AdminUnsplitRequest) XXX_DiscardUnknown Uses

func (m *AdminUnsplitRequest) XXX_DiscardUnknown()

func (*AdminUnsplitRequest) XXX_Marshal Uses

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

func (*AdminUnsplitRequest) XXX_Merge Uses

func (dst *AdminUnsplitRequest) XXX_Merge(src proto.Message)

func (*AdminUnsplitRequest) XXX_Size Uses

func (m *AdminUnsplitRequest) XXX_Size() int

func (*AdminUnsplitRequest) XXX_Unmarshal Uses

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

type AdminUnsplitResponse Uses

type AdminUnsplitResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
}

An AdminUnsplitResponse is the return value from the AdminUnsplit() method.

func (*AdminUnsplitResponse) Descriptor Uses

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

func (*AdminUnsplitResponse) Marshal Uses

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

func (*AdminUnsplitResponse) MarshalTo Uses

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

func (*AdminUnsplitResponse) ProtoMessage Uses

func (*AdminUnsplitResponse) ProtoMessage()

func (*AdminUnsplitResponse) Reset Uses

func (m *AdminUnsplitResponse) Reset()

func (*AdminUnsplitResponse) Size Uses

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

func (*AdminUnsplitResponse) String Uses

func (m *AdminUnsplitResponse) String() string

func (*AdminUnsplitResponse) Unmarshal Uses

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

func (*AdminUnsplitResponse) XXX_DiscardUnknown Uses

func (m *AdminUnsplitResponse) XXX_DiscardUnknown()

func (*AdminUnsplitResponse) XXX_Marshal Uses

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

func (*AdminUnsplitResponse) XXX_Merge Uses

func (dst *AdminUnsplitResponse) XXX_Merge(src proto.Message)

func (*AdminUnsplitResponse) XXX_Size Uses

func (m *AdminUnsplitResponse) XXX_Size() int

func (*AdminUnsplitResponse) XXX_Unmarshal Uses

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

type AmbiguousResultError Uses

type AmbiguousResultError struct {
    Message string `protobuf:"bytes,1,opt,name=message" json:"message"`
    // This can be set to give extra information about which error was converted
    // into an AmbiguousResultError. Useful for tests.
    WrappedErr *Error `protobuf:"bytes,2,opt,name=wrapped_err,json=wrappedErr" json:"wrapped_err,omitempty"`
}

An AmbiguousResultError indicates that a request may have succeeded or failed, but the response was not received and the final result is ambiguous.

func NewAmbiguousResultError Uses

func NewAmbiguousResultError(msg string) *AmbiguousResultError

NewAmbiguousResultError initializes a new AmbiguousResultError with an explanatory message.

func (*AmbiguousResultError) ClientVisibleAmbiguousError Uses

func (e *AmbiguousResultError) ClientVisibleAmbiguousError()

ClientVisibleAmbiguousError implements the ClientVisibleAmbiguousError interface.

func (*AmbiguousResultError) Descriptor Uses

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

func (*AmbiguousResultError) Equal Uses

func (this *AmbiguousResultError) Equal(that interface{}) bool

func (*AmbiguousResultError) Error Uses

func (e *AmbiguousResultError) Error() string

func (*AmbiguousResultError) Marshal Uses

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

func (*AmbiguousResultError) MarshalTo Uses

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

func (*AmbiguousResultError) ProtoMessage Uses

func (*AmbiguousResultError) ProtoMessage()

func (*AmbiguousResultError) Reset Uses

func (m *AmbiguousResultError) Reset()

func (*AmbiguousResultError) Size Uses

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

func (*AmbiguousResultError) String Uses

func (m *AmbiguousResultError) String() string

func (*AmbiguousResultError) Unmarshal Uses

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

func (*AmbiguousResultError) XXX_DiscardUnknown Uses

func (m *AmbiguousResultError) XXX_DiscardUnknown()

func (*AmbiguousResultError) XXX_Marshal Uses

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

func (*AmbiguousResultError) XXX_Merge Uses

func (dst *AmbiguousResultError) XXX_Merge(src proto.Message)

func (*AmbiguousResultError) XXX_Size Uses

func (m *AmbiguousResultError) XXX_Size() int

func (*AmbiguousResultError) XXX_Unmarshal Uses

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

type Attributes Uses

type Attributes struct {
    Attrs []string `protobuf:"bytes,1,rep,name=attrs" json:"attrs,omitempty" yaml:"attrs,flow"`
}

Attributes specifies a list of arbitrary strings describing node topology, store type, and machine capabilities.

func (*Attributes) Descriptor Uses

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

func (Attributes) Equals Uses

func (a Attributes) Equals(b Attributes) bool

Equals returns whether the Attributes lists are equivalent. Attributes lists are treated as sets, meaning that ordering and duplicates are ignored.

func (*Attributes) Marshal Uses

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

func (*Attributes) MarshalTo Uses

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

func (*Attributes) ProtoMessage Uses

func (*Attributes) ProtoMessage()

func (*Attributes) Reset Uses

func (m *Attributes) Reset()

func (*Attributes) Size Uses

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

func (Attributes) String Uses

func (a Attributes) String() string

String implements the fmt.Stringer interface.

func (*Attributes) Unmarshal Uses

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

func (*Attributes) XXX_DiscardUnknown Uses

func (m *Attributes) XXX_DiscardUnknown()

func (*Attributes) XXX_Marshal Uses

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

func (*Attributes) XXX_Merge Uses

func (dst *Attributes) XXX_Merge(src proto.Message)

func (*Attributes) XXX_Size Uses

func (m *Attributes) XXX_Size() int

func (*Attributes) XXX_Unmarshal Uses

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

type BatchRequest Uses

type BatchRequest struct {
    Header   `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
    Requests []RequestUnion `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests"`
}

A BatchRequest contains one or more requests to be executed in parallel, or if applicable (based on write-only commands and range-locality), as a single update.

func (*BatchRequest) Add Uses

func (ba *BatchRequest) Add(requests ...Request)

Add adds a request to the batch request. It's a convenience method; requests may also be added directly into the slice.

func (*BatchRequest) CreateReply Uses

func (ba *BatchRequest) CreateReply() *BatchResponse

CreateReply creates replies for each of the contained requests, wrapped in a BatchResponse. The response objects are batch allocated to minimize allocation overhead.

func (*BatchRequest) Descriptor Uses

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

func (*BatchRequest) GetArg Uses

func (ba *BatchRequest) GetArg(method Method) (Request, bool)

GetArg returns a request of the given type if one is contained in the Batch. The request returned is the first of its kind, with the exception of EndTransaction, where it examines the very last request only.

func (*BatchRequest) GetPrevLeaseForLeaseRequest Uses

func (ba *BatchRequest) GetPrevLeaseForLeaseRequest() Lease

GetPrevLeaseForLeaseRequest returns the previous lease, at the time of proposal, for a request lease or transfer lease request. If the batch does not contain a single lease request, this method will panic.

func (*BatchRequest) IntentSpanIterate Uses

func (ba *BatchRequest) IntentSpanIterate(br *BatchResponse, fn func(Span))

IntentSpanIterate calls the passed method with the key ranges of the transactional writes contained in the batch. Usually the key spans contained in the requests are used, but when a response contains a ResumeSpan the ResumeSpan is subtracted from the request span to provide a more minimal span of keys affected by the request.

func (*BatchRequest) IsAdmin Uses

func (ba *BatchRequest) IsAdmin() bool

IsAdmin returns true iff the BatchRequest contains an admin request.

func (*BatchRequest) IsAllTransactional Uses

func (ba *BatchRequest) IsAllTransactional() bool

IsAllTransactional returns true iff the BatchRequest contains only requests that can be part of a transaction.

func (*BatchRequest) IsCompleteTransaction Uses

func (ba *BatchRequest) IsCompleteTransaction() bool

IsCompleteTransaction determines whether a batch contains every write in a transactions.

func (*BatchRequest) IsLeaseRequest Uses

func (ba *BatchRequest) IsLeaseRequest() bool

IsLeaseRequest returns whether the batch consists of a single RequestLease request. Note that TransferLease requests return false. RequestLease requests are special because they're the only type of requests a non-lease-holder can propose.

func (*BatchRequest) IsReadOnly Uses

func (ba *BatchRequest) IsReadOnly() bool

IsReadOnly returns true if all requests within are read-only.

func (*BatchRequest) IsReverse Uses

func (ba *BatchRequest) IsReverse() bool

IsReverse returns true iff the BatchRequest contains a reverse request.

func (*BatchRequest) IsSingleAbortTransactionRequest Uses

func (ba *BatchRequest) IsSingleAbortTransactionRequest() bool

IsSingleAbortTransactionRequest returns true iff the batch contains a single request, and that request is an EndTransactionRequest(commit=false).

func (*BatchRequest) IsSingleAddSSTableRequest Uses

func (ba *BatchRequest) IsSingleAddSSTableRequest() bool

IsSingleAddSSTableRequest returns true iff the batch contains a single request, and that request is an AddSSTableRequest.

func (*BatchRequest) IsSingleComputeChecksumRequest Uses

func (ba *BatchRequest) IsSingleComputeChecksumRequest() bool

IsSingleComputeChecksumRequest returns true iff the batch contains a single request, and that request is a ComputeChecksumRequest.

func (*BatchRequest) IsSingleEndTransactionRequest Uses

func (ba *BatchRequest) IsSingleEndTransactionRequest() bool

IsSingleEndTransactionRequest returns true iff the batch contains a single request, and that request is an EndTransactionRequest.

func (*BatchRequest) IsSingleHeartbeatTxnRequest Uses

func (ba *BatchRequest) IsSingleHeartbeatTxnRequest() bool

IsSingleHeartbeatTxnRequest returns true iff the batch contains a single request, and that request is a HeartbeatTxn.

func (*BatchRequest) IsSinglePushTxnRequest Uses

func (ba *BatchRequest) IsSinglePushTxnRequest() bool

IsSinglePushTxnRequest returns true iff the batch contains a single request, and that request is for a PushTxn.

func (*BatchRequest) IsSingleQueryTxnRequest Uses

func (ba *BatchRequest) IsSingleQueryTxnRequest() bool

IsSingleQueryTxnRequest returns true iff the batch contains a single request, and that request is for a QueryTxn.

func (*BatchRequest) IsSingleRequest Uses

func (ba *BatchRequest) IsSingleRequest() bool

IsSingleRequest returns true iff the BatchRequest contains a single request.

func (*BatchRequest) IsSingleSkipLeaseCheckRequest Uses

func (ba *BatchRequest) IsSingleSkipLeaseCheckRequest() bool

IsSingleSkipLeaseCheckRequest returns true iff the batch contains a single request, and that request has the skipLeaseCheck flag set.

func (*BatchRequest) IsSingleSubsumeRequest Uses

func (ba *BatchRequest) IsSingleSubsumeRequest() bool

IsSingleSubsumeRequest returns true iff the batch contains a single request, and that request is an SubsumeRequest.

func (*BatchRequest) IsTransactionWrite Uses

func (ba *BatchRequest) IsTransactionWrite() bool

IsTransactionWrite returns true iff the BatchRequest contains a txn write.

func (*BatchRequest) IsTransactional Uses

func (ba *BatchRequest) IsTransactional() bool

IsTransactional returns true iff the BatchRequest contains requests that can be part of a transaction.

func (*BatchRequest) IsUnsplittable Uses

func (ba *BatchRequest) IsUnsplittable() bool

IsUnsplittable returns true iff the BatchRequest an un-splittable request.

func (*BatchRequest) IsWrite Uses

func (ba *BatchRequest) IsWrite() bool

IsWrite returns true iff the BatchRequest contains a write.

func (*BatchRequest) Marshal Uses

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

func (*BatchRequest) MarshalTo Uses

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

func (*BatchRequest) Methods Uses

func (ba *BatchRequest) Methods() []Method

Methods returns a slice of the contained methods.

func (*BatchRequest) ProtoMessage Uses

func (*BatchRequest) ProtoMessage()

func (*BatchRequest) RefreshSpanIterate Uses

func (ba *BatchRequest) RefreshSpanIterate(br *BatchResponse, fn func(Span, bool) bool) bool

RefreshSpanIterate calls the passed function with the key spans of requests in the batch which need to be refreshed. These requests must be checked via Refresh/RefreshRange to avoid having to restart a SERIALIZABLE transaction. Usually the key spans contained in the requests are used, but when a response contains a ResumeSpan the ResumeSpan is subtracted from the request span to provide a more minimal span of keys affected by the request. The supplied function is called with each span and a bool indicating whether the span updates the write timestamp cache.

The function can return false if it wants the iteration to break. In that case, RefreshSpanIterate also returns false.

func (*BatchRequest) RequiresLeaseHolder Uses

func (ba *BatchRequest) RequiresLeaseHolder() bool

RequiresLeaseHolder returns true if the request can only be served by the leaseholders of the ranges it addresses.

func (*BatchRequest) Reset Uses

func (m *BatchRequest) Reset()

func (*BatchRequest) SetActiveTimestamp Uses

func (ba *BatchRequest) SetActiveTimestamp(nowFn func() hlc.Timestamp) error

SetActiveTimestamp sets the correct timestamp at which the request is to be carried out. For transactional requests, ba.Timestamp must be zero initially and it will be set to txn.OrigTimestamp (and forwarded to txn.SafeTimestamp if non-zero). For non-transactional requests, if no timestamp is specified, nowFn is used to create and set one.

func (*BatchRequest) Size Uses

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

func (BatchRequest) Split Uses

func (ba BatchRequest) Split(canSplitET bool) [][]RequestUnion

Split separates the requests contained in a batch so that each subset of requests can be executed by a Store (without changing order). In particular, Admin requests are always singled out and mutating requests separated from reads. The boolean parameter indicates whether EndTransaction should be special-cased: If false, an EndTransaction request will never be split into a new chunk (otherwise, it is treated according to its flags). This allows sending a whole transaction in a single Batch when addressing a single range.

func (BatchRequest) String Uses

func (ba BatchRequest) String() string

String gives a brief summary of the contained requests and keys in the batch. TODO(tschottdorf): the key range is useful information, but requires `keys`. See #2198.

func (*BatchRequest) Summary Uses

func (ba *BatchRequest) Summary() string

Summary prints a short summary of the requests in a batch.

func (*BatchRequest) Unmarshal Uses

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

func (*BatchRequest) UpdateTxn Uses

func (ba *BatchRequest) UpdateTxn(o *Transaction)

UpdateTxn updates the batch transaction from the supplied one in a copy-on-write fashion, i.e. without mutating an existing Transaction struct.

func (*BatchRequest) WriteSummary Uses

func (ba *BatchRequest) WriteSummary(b *strings.Builder)

WriteSummary writes a short summary of the requests in a batch to the provided builder.

func (*BatchRequest) XXX_DiscardUnknown Uses

func (m *BatchRequest) XXX_DiscardUnknown()

func (*BatchRequest) XXX_Marshal Uses

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

func (*BatchRequest) XXX_Merge Uses

func (dst *BatchRequest) XXX_Merge(src proto.Message)

func (*BatchRequest) XXX_Size Uses

func (m *BatchRequest) XXX_Size() int

func (*BatchRequest) XXX_Unmarshal Uses

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

type BatchResponse Uses

type BatchResponse struct {
    BatchResponse_Header `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
    Responses            []ResponseUnion `protobuf:"bytes,2,rep,name=responses,proto3" json:"responses"`
}

A BatchResponse contains one or more responses, one per request corresponding to the requests in the matching BatchRequest. The error in the response header is set to the first error from the slice of responses, if applicable.

func (*BatchResponse) Add Uses

func (br *BatchResponse) Add(reply Response)

Add adds a response to the batch response. It's a convenience method; responses may also be added directly.

func (*BatchResponse) Combine Uses

func (br *BatchResponse) Combine(otherBatch *BatchResponse, positions []int) error

Combine combines each slot of the given request into the corresponding slot of the base response. The number of slots must be equal and the respective slots must be combinable. On error, the receiver BatchResponse is in an invalid state. In either case, the supplied BatchResponse must not be used any more. It is an error to call Combine on responses with errors in them. The DistSender strips the errors from any responses that it combines.

func (*BatchResponse) Descriptor Uses

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

func (*BatchResponse) Marshal Uses

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

func (*BatchResponse) MarshalTo Uses

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

func (*BatchResponse) ProtoMessage Uses

func (*BatchResponse) ProtoMessage()

func (*BatchResponse) Reset Uses

func (m *BatchResponse) Reset()

func (*BatchResponse) Size Uses

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

func (*BatchResponse) String Uses

func (br *BatchResponse) String() string

func (*BatchResponse) Unmarshal Uses

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

func (*BatchResponse) XXX_DiscardUnknown Uses

func (m *BatchResponse) XXX_DiscardUnknown()

func (*BatchResponse) XXX_Marshal Uses

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

func (*BatchResponse) XXX_Merge Uses

func (dst *BatchResponse) XXX_Merge(src proto.Message)

func (*BatchResponse) XXX_Size Uses

func (m *BatchResponse) XXX_Size() int

func (*BatchResponse) XXX_Unmarshal Uses

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

type BatchResponse_Header Uses

type BatchResponse_Header struct {
    // error communicates a structured error (i.e. one originating from a Node)
    // while the BatchResponse is sent over the network. If the code were
    // written today, the RPC endpoint would return a message containing both a
    // BatchResponse and an Error, and this embedding would go away. However, it
    // returns only a BatchResponse, and so the Error needs to be tucked away
    // somewhere (the structured error cannot be communicated via an RPC-level
    // error).
    //
    // Outside of the RPC boundaries, this field is nil and must neither be
    // checked nor populated (it is reset by the DistSender, which extracts this
    // error and returns it separately). In effect, nearly no usage of
    // BatchResponse needs to care about this field.
    Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
    // timestamp is set only for non-transactional responses and denotes the
    // timestamp at which the batch executed. The timestamp cache is updated
    // at this timestamp.
    Timestamp hlc.Timestamp `protobuf:"bytes,2,opt,name=Timestamp,proto3" json:"Timestamp"`
    // txn is non-nil if the request specified a non-nil
    // transaction. The transaction timestamp and/or priority may have
    // been updated, depending on the outcome of the request.
    Txn *Transaction `protobuf:"bytes,3,opt,name=txn,proto3" json:"txn,omitempty"`
    // now is the highest current time from any node contacted during the request.
    // It can be used by the receiver to update its local HLC.
    Now hlc.Timestamp `protobuf:"bytes,5,opt,name=now,proto3" json:"now"`
    // collected_spans stores trace spans recorded during the execution of this
    // request.
    CollectedSpans []tracing.RecordedSpan `protobuf:"bytes,6,rep,name=collected_spans,json=collectedSpans,proto3" json:"collected_spans"`
}

func (*BatchResponse_Header) Descriptor Uses

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

func (*BatchResponse_Header) Marshal Uses

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

func (*BatchResponse_Header) MarshalTo Uses

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

func (*BatchResponse_Header) ProtoMessage Uses

func (*BatchResponse_Header) ProtoMessage()

func (*BatchResponse_Header) Reset Uses

func (m *BatchResponse_Header) Reset()

func (*BatchResponse_Header) Size Uses

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

func (*BatchResponse_Header) String Uses

func (m *BatchResponse_Header) String() string

func (*BatchResponse_Header) Unmarshal Uses

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

func (*BatchResponse_Header) XXX_DiscardUnknown Uses

func (m *BatchResponse_Header) XXX_DiscardUnknown()

func (*BatchResponse_Header) XXX_Marshal Uses

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

func (*BatchResponse_Header) XXX_Merge Uses

func (dst *BatchResponse_Header) XXX_Merge(src proto.Message)

func (*BatchResponse_Header) XXX_Size Uses

func (m *BatchResponse_Header) XXX_Size() int

func (*BatchResponse_Header) XXX_Unmarshal Uses

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

type BatchTimestampBeforeGCError Uses

type BatchTimestampBeforeGCError struct {
    Timestamp hlc.Timestamp `protobuf:"bytes,1,opt,name=Timestamp" json:"Timestamp"`
    Threshold hlc.Timestamp `protobuf:"bytes,2,opt,name=Threshold" json:"Threshold"`
}

A BatchTimestampBeforeGCError indicates that a request's timestamp was before the GC threshold.

func (*BatchTimestampBeforeGCError) Descriptor Uses

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

func (*BatchTimestampBeforeGCError) Equal Uses

func (this *BatchTimestampBeforeGCError) Equal(that interface{}) bool

func (*BatchTimestampBeforeGCError) Error Uses

func (e *BatchTimestampBeforeGCError) Error() string

func (*BatchTimestampBeforeGCError) Marshal Uses

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

func (*BatchTimestampBeforeGCError) MarshalTo Uses

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

func (*BatchTimestampBeforeGCError) ProtoMessage Uses

func (*BatchTimestampBeforeGCError) ProtoMessage()

func (*BatchTimestampBeforeGCError) Reset Uses

func (m *BatchTimestampBeforeGCError) Reset()

func (*BatchTimestampBeforeGCError) Size Uses

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

func (*BatchTimestampBeforeGCError) String Uses

func (m *BatchTimestampBeforeGCError) String() string

func (*BatchTimestampBeforeGCError) Unmarshal Uses

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

func (*BatchTimestampBeforeGCError) XXX_DiscardUnknown Uses

func (m *BatchTimestampBeforeGCError) XXX_DiscardUnknown()

func (*BatchTimestampBeforeGCError) XXX_Marshal Uses

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

func (*BatchTimestampBeforeGCError) XXX_Merge Uses

func (dst *BatchTimestampBeforeGCError) XXX_Merge(src proto.Message)

func (*BatchTimestampBeforeGCError) XXX_Size Uses

func (m *BatchTimestampBeforeGCError) XXX_Size() int

func (*BatchTimestampBeforeGCError) XXX_Unmarshal Uses

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

type BeginTransactionRequest Uses

type BeginTransactionRequest struct {
    RequestHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
}

A BeginTransactionRequest is the argument to the BeginTransaction() method.

func (*BeginTransactionRequest) Descriptor Uses

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

func (*BeginTransactionRequest) Equal Uses

func (this *BeginTransactionRequest) Equal(that interface{}) bool

func (*BeginTransactionRequest) Marshal Uses

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

func (*BeginTransactionRequest) MarshalTo Uses

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

func (*BeginTransactionRequest) Method Uses

func (*BeginTransactionRequest) Method() Method

Method implements the Request interface.

func (*BeginTransactionRequest) ProtoMessage Uses

func (*BeginTransactionRequest) ProtoMessage()

func (*BeginTransactionRequest) Reset Uses

func (m *BeginTransactionRequest) Reset()

func (*BeginTransactionRequest) ShallowCopy Uses

func (btr *BeginTransactionRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*BeginTransactionRequest) Size Uses

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

func (*BeginTransactionRequest) String Uses

func (m *BeginTransactionRequest) String() string

func (*BeginTransactionRequest) Unmarshal Uses

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

func (*BeginTransactionRequest) XXX_DiscardUnknown Uses

func (m *BeginTransactionRequest) XXX_DiscardUnknown()

func (*BeginTransactionRequest) XXX_Marshal Uses

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

func (*BeginTransactionRequest) XXX_Merge Uses

func (dst *BeginTransactionRequest) XXX_Merge(src proto.Message)

func (*BeginTransactionRequest) XXX_Size Uses

func (m *BeginTransactionRequest) XXX_Size() int

func (*BeginTransactionRequest) XXX_Unmarshal Uses

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

type BeginTransactionResponse Uses

type BeginTransactionResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
}

A BeginTransactionResponse is the return value from the BeginTransaction() method.

func (*BeginTransactionResponse) Descriptor Uses

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

func (*BeginTransactionResponse) Marshal Uses

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

func (*BeginTransactionResponse) MarshalTo Uses

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

func (*BeginTransactionResponse) ProtoMessage Uses

func (*BeginTransactionResponse) ProtoMessage()

func (*BeginTransactionResponse) Reset Uses

func (m *BeginTransactionResponse) Reset()

func (*BeginTransactionResponse) Size Uses

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

func (*BeginTransactionResponse) String Uses

func (m *BeginTransactionResponse) String() string

func (*BeginTransactionResponse) Unmarshal Uses

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

func (*BeginTransactionResponse) XXX_DiscardUnknown Uses

func (m *BeginTransactionResponse) XXX_DiscardUnknown()

func (*BeginTransactionResponse) XXX_Marshal Uses

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

func (*BeginTransactionResponse) XXX_Merge Uses

func (dst *BeginTransactionResponse) XXX_Merge(src proto.Message)

func (*BeginTransactionResponse) XXX_Size Uses

func (m *BeginTransactionResponse) XXX_Size() int

func (*BeginTransactionResponse) XXX_Unmarshal Uses

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

type BulkOpSummary Uses

type BulkOpSummary struct {
    DataSize      int64 `protobuf:"varint,1,opt,name=data_size,json=dataSize,proto3" json:"data_size,omitempty"`
    Rows          int64 `protobuf:"varint,2,opt,name=rows,proto3" json:"rows,omitempty"`
    IndexEntries  int64 `protobuf:"varint,3,opt,name=index_entries,json=indexEntries,proto3" json:"index_entries,omitempty"`
    SystemRecords int64 `protobuf:"varint,4,opt,name=system_records,json=systemRecords,proto3" json:"system_records,omitempty"`
}

func (*BulkOpSummary) Add Uses

func (b *BulkOpSummary) Add(other BulkOpSummary)

Add combines the values from other, for use on an accumulator BulkOpSummary.

func (*BulkOpSummary) Descriptor Uses

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

func (*BulkOpSummary) Marshal Uses

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

func (*BulkOpSummary) MarshalTo Uses

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

func (*BulkOpSummary) ProtoMessage Uses

func (*BulkOpSummary) ProtoMessage()

func (*BulkOpSummary) Reset Uses

func (m *BulkOpSummary) Reset()

func (*BulkOpSummary) Size Uses

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

func (*BulkOpSummary) String Uses

func (m *BulkOpSummary) String() string

func (*BulkOpSummary) Unmarshal Uses

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

func (*BulkOpSummary) XXX_DiscardUnknown Uses

func (m *BulkOpSummary) XXX_DiscardUnknown()

func (*BulkOpSummary) XXX_Marshal Uses

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

func (*BulkOpSummary) XXX_Merge Uses

func (dst *BulkOpSummary) XXX_Merge(src proto.Message)

func (*BulkOpSummary) XXX_Size Uses

func (m *BulkOpSummary) XXX_Size() int

func (*BulkOpSummary) XXX_Unmarshal Uses

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

type CSVOptions Uses

type CSVOptions struct {
    // comma is an delimiter used by the CSV file; defaults to a comma.
    Comma int32 `protobuf:"varint,1,opt,name=comma" json:"comma"`
    // comment is an comment rune; zero value means comments not enabled.
    Comment int32 `protobuf:"varint,2,opt,name=comment" json:"comment"`
    // null_encoding, if not nil, is the string which identifies a NULL. Can be the empty string.
    NullEncoding *string `protobuf:"bytes,3,opt,name=null_encoding,json=nullEncoding" json:"null_encoding,omitempty"`
    // skip the first N lines of the input (e.g. to ignore column headers) when reading.
    Skip uint32 `protobuf:"varint,4,opt,name=skip" json:"skip"`
}

CSVOptions describe the format of csv data (delimiter, comment, etc).

func (*CSVOptions) Descriptor Uses

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

func (*CSVOptions) Marshal Uses

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

func (*CSVOptions) MarshalTo Uses

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

func (*CSVOptions) ProtoMessage Uses

func (*CSVOptions) ProtoMessage()

func (*CSVOptions) Reset Uses

func (m *CSVOptions) Reset()

func (*CSVOptions) Size Uses

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

func (*CSVOptions) String Uses

func (m *CSVOptions) String() string

func (*CSVOptions) Unmarshal Uses

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

func (*CSVOptions) XXX_DiscardUnknown Uses

func (m *CSVOptions) XXX_DiscardUnknown()

func (*CSVOptions) XXX_Marshal Uses

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

func (*CSVOptions) XXX_Merge Uses

func (dst *CSVOptions) XXX_Merge(src proto.Message)

func (*CSVOptions) XXX_Size Uses

func (m *CSVOptions) XXX_Size() int

func (*CSVOptions) XXX_Unmarshal Uses

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

type ChangeReplicasTrigger Uses

type ChangeReplicasTrigger struct {
    // TODO(tbg): remove once we know that no trigger using this will ever be
    // applied (this will require something like #39182).
    //
    // TODO(tbg): when removing this, also rename internal_x_replicas to just
    // x_replicas and remove the getter.
    DeprecatedChangeType ReplicaChangeType `protobuf:"varint,1,opt,name=deprecated_change_type,json=deprecatedChangeType,proto3,enum=cockroach.roachpb.ReplicaChangeType" json:"deprecated_change_type,omitempty"`
    // The replica being modified.
    // TODO(tbg): remove once we know that no trigger using this will ever be
    // applied (this will require something like #39182).
    DeprecatedReplica ReplicaDescriptor `protobuf:"bytes,2,opt,name=deprecated_replica,json=deprecatedReplica,proto3" json:"deprecated_replica"`
    // The new replica list with this change applied.
    DeprecatedUpdatedReplicas []ReplicaDescriptor `protobuf:"bytes,3,rep,name=deprecated_updated_replicas,json=deprecatedUpdatedReplicas,proto3" json:"deprecated_updated_replicas"`
    // The next replica id to use with this change applied.
    DeprecatedNextReplicaID ReplicaID `protobuf:"varint,4,opt,name=deprecated_next_replica_id,json=deprecatedNextReplicaId,proto3,casttype=ReplicaID" json:"deprecated_next_replica_id,omitempty"`
    // The updated range descriptor. If desc is non-nil, then it overrides
    // updated_replicas and next_replica_id. This incremental addition is needed
    // to maintain backwards compatibility.
    // TODO(jeffreyxiao): Remove deprecated_updated_replicas and
    // deprecated_next_replica_id in 20.1.
    Desc *RangeDescriptor `protobuf:"bytes,5,opt,name=desc,proto3" json:"desc,omitempty"`
    // The new replicas added to the range descriptor in this change, exactly as
    // they appear in the updated range descriptor.
    InternalAddedReplicas []ReplicaDescriptor `protobuf:"bytes,6,rep,name=internal_added_replicas,json=internalAddedReplicas,proto3" json:"internal_added_replicas"`
    // The replicas whose removal is being initiated in this change. If the
    // replica is still present as an outgoing voter in the updated descriptor
    // (i.e. if this is a full atomic replication change), then the replica here
    // must match that in the descriptor; otherwise it must match the replica
    // removed from the descriptor in the course of this change (which is itself
    // not visible to this trigger).
    InternalRemovedReplicas []ReplicaDescriptor `protobuf:"bytes,7,rep,name=internal_removed_replicas,json=internalRemovedReplicas,proto3" json:"internal_removed_replicas"`
}

ChangeReplicasTrigger carries out a replication change. The Added() and Removed() methods return the replicas being added and removed, respectively. If more than one change is specified (i.e. len(Added())+len(Removed()) exceeds one), this initiates an atomic replication change in which the "removed" replicas are of type VOTER_OUTGOING. This joint configuration is left via another ChangeReplicasTrigger which does not specify any additions nor removals.

func (ChangeReplicasTrigger) Added Uses

func (crt ChangeReplicasTrigger) Added() []ReplicaDescriptor

Added returns the replicas added by this change (if there are any).

func (ChangeReplicasTrigger) ConfChange Uses

func (crt ChangeReplicasTrigger) ConfChange(encodedCtx []byte) (raftpb.ConfChangeI, error)

ConfChange returns the configuration change described by the trigger.

func (*ChangeReplicasTrigger) Descriptor Uses

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

func (*ChangeReplicasTrigger) Equal Uses

func (this *ChangeReplicasTrigger) Equal(that interface{}) bool

func (*ChangeReplicasTrigger) Marshal Uses

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

func (*ChangeReplicasTrigger) MarshalTo Uses

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

func (*ChangeReplicasTrigger) ProtoMessage Uses

func (*ChangeReplicasTrigger) ProtoMessage()

func (ChangeReplicasTrigger) Removed Uses

func (crt ChangeReplicasTrigger) Removed() []ReplicaDescriptor

Removed returns the replicas removed by this change (if there are any).

func (ChangeReplicasTrigger) Replicas Uses

func (crt ChangeReplicasTrigger) Replicas() []ReplicaDescriptor

Replicas returns all of the replicas present in the descriptor after this trigger applies.

func (*ChangeReplicasTrigger) Reset Uses

func (m *ChangeReplicasTrigger) Reset()

func (*ChangeReplicasTrigger) Size Uses

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

func (ChangeReplicasTrigger) String Uses

func (crt ChangeReplicasTrigger) String() string

func (*ChangeReplicasTrigger) Unmarshal Uses

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

func (*ChangeReplicasTrigger) XXX_DiscardUnknown Uses

func (m *ChangeReplicasTrigger) XXX_DiscardUnknown()

func (*ChangeReplicasTrigger) XXX_Marshal Uses

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

func (*ChangeReplicasTrigger) XXX_Merge Uses

func (dst *ChangeReplicasTrigger) XXX_Merge(src proto.Message)

func (*ChangeReplicasTrigger) XXX_Size Uses

func (m *ChangeReplicasTrigger) XXX_Size() int

func (*ChangeReplicasTrigger) XXX_Unmarshal Uses

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

type CheckConsistencyRequest Uses

type CheckConsistencyRequest struct {
    RequestHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
    // log a diff of inconsistencies if such inconsistencies are found. This is only
    // valid if mode == FROM_QUEUE
    WithDiff bool         `protobuf:"varint,2,opt,name=with_diff,json=withDiff,proto3" json:"with_diff,omitempty"`
    Mode     ChecksumMode `protobuf:"varint,3,opt,name=mode,proto3,enum=cockroach.roachpb.ChecksumMode" json:"mode,omitempty"`
    // Whether to create a RocksDB checkpoint on each replica at the log position
    // at which the SHA is computed. The checkpoint is essentially a cheap point-
    // in-time backup of the database. It will be put into the engines' auxiliary
    // directory and needs to be removed manually to avoid leaking disk space.
    Checkpoint bool `protobuf:"varint,4,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
}

A CheckConsistencyRequest is the argument to the CheckConsistency() method. It specifies the start and end keys for a span of ranges to which a consistency check should be applied. A consistency check on a range involves running a ComputeChecksum on the range followed by a storage.CollectChecksum.

func (*CheckConsistencyRequest) Descriptor Uses

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

func (*CheckConsistencyRequest) Equal Uses

func (this *CheckConsistencyRequest) Equal(that interface{}) bool

func (*CheckConsistencyRequest) Marshal Uses

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

func (*CheckConsistencyRequest) MarshalTo Uses

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

func (*CheckConsistencyRequest) Method Uses

func (*CheckConsistencyRequest) Method() Method

Method implements the Request interface.

func (*CheckConsistencyRequest) ProtoMessage Uses

func (*CheckConsistencyRequest) ProtoMessage()

func (*CheckConsistencyRequest) Reset Uses

func (m *CheckConsistencyRequest) Reset()

func (*CheckConsistencyRequest) ShallowCopy Uses

func (ccr *CheckConsistencyRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*CheckConsistencyRequest) Size Uses

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

func (*CheckConsistencyRequest) String Uses

func (m *CheckConsistencyRequest) String() string

func (*CheckConsistencyRequest) Unmarshal Uses

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

func (*CheckConsistencyRequest) XXX_DiscardUnknown Uses

func (m *CheckConsistencyRequest) XXX_DiscardUnknown()

func (*CheckConsistencyRequest) XXX_Marshal Uses

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

func (*CheckConsistencyRequest) XXX_Merge Uses

func (dst *CheckConsistencyRequest) XXX_Merge(src proto.Message)

func (*CheckConsistencyRequest) XXX_Size Uses

func (m *CheckConsistencyRequest) XXX_Size() int

func (*CheckConsistencyRequest) XXX_Unmarshal Uses

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

type CheckConsistencyResponse Uses

type CheckConsistencyResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
    // result contains a Result for each Range checked, in no particular order.
    Result []CheckConsistencyResponse_Result `protobuf:"bytes,2,rep,name=result,proto3" json:"result"`
}

A CheckConsistencyResponse is the return value from the CheckConsistency() method. It returns the status the range was found in.

func (*CheckConsistencyResponse) Descriptor Uses

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

func (*CheckConsistencyResponse) Marshal Uses

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

func (*CheckConsistencyResponse) MarshalTo Uses

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

func (*CheckConsistencyResponse) ProtoMessage Uses

func (*CheckConsistencyResponse) ProtoMessage()

func (*CheckConsistencyResponse) Reset Uses

func (m *CheckConsistencyResponse) Reset()

func (*CheckConsistencyResponse) Size Uses

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

func (*CheckConsistencyResponse) String Uses

func (m *CheckConsistencyResponse) String() string

func (*CheckConsistencyResponse) Unmarshal Uses

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

func (*CheckConsistencyResponse) XXX_DiscardUnknown Uses

func (m *CheckConsistencyResponse) XXX_DiscardUnknown()

func (*CheckConsistencyResponse) XXX_Marshal Uses

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

func (*CheckConsistencyResponse) XXX_Merge Uses

func (dst *CheckConsistencyResponse) XXX_Merge(src proto.Message)

func (*CheckConsistencyResponse) XXX_Size Uses

func (m *CheckConsistencyResponse) XXX_Size() int

func (*CheckConsistencyResponse) XXX_Unmarshal Uses

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

type CheckConsistencyResponse_Result Uses

type CheckConsistencyResponse_Result struct {
    RangeID RangeID `protobuf:"varint,1,opt,name=range_id,json=rangeId,proto3,casttype=RangeID" json:"range_id,omitempty"`
    // start_key of the range corresponding to range_id (at the time of the
    // check). This is useful to send additional requests to only a subset of
    // ranges contained within a result later, as requests can only be routed by
    // key.
    StartKey []byte                          `protobuf:"bytes,2,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"`
    Status   CheckConsistencyResponse_Status `protobuf:"varint,3,opt,name=status,proto3,enum=cockroach.roachpb.CheckConsistencyResponse_Status" json:"status,omitempty"`
    // detail contains information related to the operation. If no inconsistency
    // is found, it contains informational value such as observed stats. If an
    // inconsistency is found, it contains information about that inconsistency
    // including the involved replica and, if requested, the diff.
    Detail string `protobuf:"bytes,4,opt,name=detail,proto3" json:"detail,omitempty"`
}

func (*CheckConsistencyResponse_Result) Descriptor Uses

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

func (*CheckConsistencyResponse_Result) Marshal Uses

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

func (*CheckConsistencyResponse_Result) MarshalTo Uses

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

func (*CheckConsistencyResponse_Result) ProtoMessage Uses

func (*CheckConsistencyResponse_Result) ProtoMessage()

func (*CheckConsistencyResponse_Result) Reset Uses

func (m *CheckConsistencyResponse_Result) Reset()

func (*CheckConsistencyResponse_Result) Size Uses

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

func (*CheckConsistencyResponse_Result) String Uses

func (m *CheckConsistencyResponse_Result) String() string

func (*CheckConsistencyResponse_Result) Unmarshal Uses

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

func (*CheckConsistencyResponse_Result) XXX_DiscardUnknown Uses

func (m *CheckConsistencyResponse_Result) XXX_DiscardUnknown()

func (*CheckConsistencyResponse_Result) XXX_Marshal Uses

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

func (*CheckConsistencyResponse_Result) XXX_Merge Uses

func (dst *CheckConsistencyResponse_Result) XXX_Merge(src proto.Message)

func (*CheckConsistencyResponse_Result) XXX_Size Uses

func (m *CheckConsistencyResponse_Result) XXX_Size() int

func (*CheckConsistencyResponse_Result) XXX_Unmarshal Uses

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

type CheckConsistencyResponse_Status Uses

type CheckConsistencyResponse_Status int32
const (
    // No inconsistency was detected, but not all replicas returned a checksum.
    CheckConsistencyResponse_RANGE_INDETERMINATE CheckConsistencyResponse_Status = 0
    // A definite inconsistency was detected.
    CheckConsistencyResponse_RANGE_INCONSISTENT CheckConsistencyResponse_Status = 1
    // All replicas of the range agreed on the checksum.
    CheckConsistencyResponse_RANGE_CONSISTENT CheckConsistencyResponse_Status = 2
    // Like RANGE_CONSISTENT, but the recomputed stats disagreed with the
    // persisted stats. The persisted stats indicates estimates, so this is
    // expected.
    CheckConsistencyResponse_RANGE_CONSISTENT_STATS_ESTIMATED CheckConsistencyResponse_Status = 3
    // Like RANGE_CONSISTENT_STATS_ESTIMATED, but the mismatch occurred with
    // persisted stats that claimed to be accurate. This is unexpected and
    // likely indicates a bug in our logic to incrementally update the stats
    // as commands are evaluated and applied.
    CheckConsistencyResponse_RANGE_CONSISTENT_STATS_INCORRECT CheckConsistencyResponse_Status = 4
)

func (CheckConsistencyResponse_Status) EnumDescriptor Uses

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

func (CheckConsistencyResponse_Status) String Uses

func (x CheckConsistencyResponse_Status) String() string

type ChecksumMode Uses

type ChecksumMode int32
const (
    // CHECK_VIA_QUEUE is set for requests made from the consistency queue. In
    // this mode, a full check is carried out, and depending on the result a
    // recursive consistency check is triggered:
    //
    // 1. no inconsistency found: if recomputed stats don't match persisted stats,
    //    trigger a RecomputeStatsRequest.
    // 2. inconsistency found: if a diff is available, print it and trigger fatal
    //    error. If no diff found, trigger recursive check with diff requested
    //    (which then triggers fatal error).
    //
    // TODO(tbg): these semantics are an artifact of how consistency checks were
    // first implemented. The extra behavior here should move to the consistency
    // check queue instead and this option dropped from the enum.
    ChecksumMode_CHECK_VIA_QUEUE ChecksumMode = 0
    // CHECK_FULL recomputes the hash of the replicate data in all replicas and
    // uses this to determine whether there is an inconsistency.
    ChecksumMode_CHECK_FULL ChecksumMode = 1
    // CHECK_STATS only hashes the persisted lease applied state (which notably
    // includes the persisted MVCCStats) only. This catches a large class of
    // replica inconsistencies observed in the wild (where replicas apply a
    // nonidentical log of commands, and as a result almost always have
    // divergent stats), while doing work independent of the size of the data
    // contained in the replicas.
    ChecksumMode_CHECK_STATS ChecksumMode = 2
)

func (ChecksumMode) EnumDescriptor Uses

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

func (ChecksumMode) String Uses

func (x ChecksumMode) String() string

type ClearRangeRequest Uses

type ClearRangeRequest struct {
    RequestHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
}

A ClearRangeRequest is the argument to the ClearRange() method. It specifies a range of keys to clear from the underlying engine. Note that this differs from the behavior of DeleteRange, which sets transactional intents and writes tombstones to the deleted keys. ClearRange is used when permanently dropping or truncating table data.

ClearRange also updates the GC threshold for the range to the timestamp at which this command executes, to prevent reads at earlier timestamps from incorrectly returning empty results.

NOTE: it is important that this method only be invoked on a key range which is guaranteed to be both inactive and not see future writes. Ignoring this warning may result in data loss.

func (*ClearRangeRequest) Descriptor Uses

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

func (*ClearRangeRequest) Equal Uses

func (this *ClearRangeRequest) Equal(that interface{}) bool

func (*ClearRangeRequest) Marshal Uses

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

func (*ClearRangeRequest) MarshalTo Uses

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

func (*ClearRangeRequest) Method Uses

func (*ClearRangeRequest) Method() Method

Method implements the Request interface.

func (*ClearRangeRequest) ProtoMessage Uses

func (*ClearRangeRequest) ProtoMessage()

func (*ClearRangeRequest) Reset Uses

func (m *ClearRangeRequest) Reset()

func (*ClearRangeRequest) ShallowCopy Uses

func (crr *ClearRangeRequest) ShallowCopy() Request

ShallowCopy implements the Request interface.

func (*ClearRangeRequest) Size Uses

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

func (*ClearRangeRequest) String Uses

func (m *ClearRangeRequest) String() string

func (*ClearRangeRequest) Unmarshal Uses

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

func (*ClearRangeRequest) XXX_DiscardUnknown Uses

func (m *ClearRangeRequest) XXX_DiscardUnknown()

func (*ClearRangeRequest) XXX_Marshal Uses

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

func (*ClearRangeRequest) XXX_Merge Uses

func (dst *ClearRangeRequest) XXX_Merge(src proto.Message)

func (*ClearRangeRequest) XXX_Size Uses

func (m *ClearRangeRequest) XXX_Size() int

func (*ClearRangeRequest) XXX_Unmarshal Uses

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

type ClearRangeResponse Uses

type ClearRangeResponse struct {
    ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
}

A ClearRangeResponse is the return value from the ClearRange() method.

func (*ClearRangeResponse) Descriptor Uses

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

func (*ClearRangeResponse) Marshal Uses

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

func (*ClearRangeResponse) MarshalTo Uses

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

func (*ClearRangeResponse) ProtoMessage Uses

func (*ClearRangeResponse) ProtoMessage()

func (*ClearRangeResponse) Reset Uses

func (m *ClearRangeResponse) Reset()

func (*ClearRangeResponse) Size Uses

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

func (*ClearRangeResponse) String Uses

func (m *ClearRangeResponse) String() string

func (*ClearRangeResponse) Unmarshal Uses

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

func (*ClearRangeResponse) XXX_DiscardUnknown Uses

func (m *ClearRangeResponse) XXX_DiscardUnknown()

func (*ClearRangeResponse) XXX_Marshal Uses

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

func (*ClearRangeResponse) XXX_Merge Uses

func (dst *ClearRangeResponse) XXX_Merge(src proto.Message)

func (*ClearRangeResponse) XXX_Size Uses

func (m *ClearRangeResponse) XXX_Size() int

func (*ClearRangeResponse) XXX_Unmarshal Uses

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

type ClientVisibleAmbiguousError Uses

type ClientVisibleAmbiguousError interface {
    ClientVisibleAmbiguousError()
}

ClientVisibleAmbiguousError is to be implemented by errors visible by layers above and that indicate uncertainty.

type ClientVisibleRetryError Uses

type ClientVisibleRetryError interface {
    ClientVisibleRetryError()
}

ClientVisibleRetryError is to be implemented by errors visible by layers above and that can be handled by retrying the transaction.

type CollectedStatementStatistics Uses

type CollectedStatementStatistics struct {
    Key   StatementStatisticsKey `protobuf:"bytes,1,opt,name=key" json:"key"`
    Stats StatementStatistics    `protobuf:"bytes,2,opt,name=stats" json:"stats"`
}

CollectedStats wraps collected timings and metadata for some query's execution.

func (*CollectedStatementStatistics) Descriptor Uses

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

func (*CollectedStatementStatistics) Marshal Uses

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

func (*CollectedStatementStatistics) MarshalTo Uses

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

func (*CollectedStatementStatistics) ProtoMessage Uses

func (*CollectedStatementStatistics) ProtoMessage()

func (*CollectedStatementStatistics) Reset Uses

func (m *CollectedStatementStatistics) Reset()

func (*CollectedStatementStatistics) Size Uses

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

func (*CollectedStatementStatistics) String Uses

func (m *CollectedStatementStatistics) String() string

func (*CollectedStatementStatistics) Unmarshal Uses

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

func (*CollectedStatementStatistics) XXX_DiscardUnknown Uses

func (m *CollectedStatementStatistics) XXX_DiscardUnknown()

func (*CollectedStatementStatistics) XXX_Marshal Uses

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

func (*CollectedStatementStatistics) XXX_Merge Uses

func (dst *CollectedStatementStatistics) XXX_Merge(src proto.Message)

func (*CollectedStatementStatistics) XXX_Size Uses

func (m *CollectedStatementStatistics) XXX_Size() int

func (*CollectedStatementStatistics) XXX_Unmarshal Uses

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

type ComputeChecksumRequest Uses

type ComputeChecksumRequest struct {
    RequestHeader `protobuf:"bytes,1,opt,name=header,proto3,embedded=header" json:"header"`
    // The version used to pick the checksum method. It allows us to use a
    // consistent checksumming method across replicas.
    Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
    // Compute a checksum along with a snapshot of the entire range, that will be
    // used in logging a diff during checksum verification.
    Snapshot bool `protobuf:"varint,4,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
    // The type of checksum to compute. See ChecksumMode.
    Mode ChecksumMode `protobuf:"varint,5,opt,name=mode,proto3,enum=cockroach.roachpb.ChecksumMode" json:"mode,omitempty"`
    // If set, a checkpoint (i.e. cheap backup) of the engine will be taken. This
    // is expected to be set only if we already know that there is a problem and
    // we want to preserve as much state as possible. The checkpoint will be stored
    // in the engine's auxiliary directory.
    Checkpoint bool `protobuf:"varint,6,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
}

A ComputeChecksumRequest is arguments to the ComputeChecksum() method, to start computing the checksum for the specified range at the snapshot for this request command. A response is returned without the checksum. The computed checksum is retrieved via a storage.CollectChecksumRequest.

func (*ComputeChecksumRequest) Descriptor Uses

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

func (*ComputeChecksumRequest) Equal Uses

func (this *ComputeChecksumRequest) Equal(that interface{}) bool

func (*ComputeChecksumRequest) Marshal Uses

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

func (*ComputeChecksumRequest) MarshalTo Uses

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

func (*ComputeChecksumRequest) Method Uses

func (*ComputeChecksumRequest) Method() Method

Method implements the Request interface.

func (*ComputeChecksumRequest) ProtoMessage Uses

func (*ComputeChecksumRequest) ProtoMessage()

func (*ComputeChecksumRequest) Reset Uses