cockroach: github.com/cockroachdb/cockroach/pkg/storage/storagepb Index | Files

package storagepb

import "github.com/cockroachdb/cockroach/pkg/storage/storagepb"

Index

Package Files

lease_status.pb.go liveness.go liveness.pb.go log.go log.pb.go proposer_kv.go proposer_kv.pb.go state.pb.go

Variables

var (
    ErrInvalidLengthLeaseStatus = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowLeaseStatus   = fmt.Errorf("proto: integer overflow")
)
var (
    ErrInvalidLengthLiveness = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowLiveness   = fmt.Errorf("proto: integer overflow")
)
var (
    ErrInvalidLengthLog = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowLog   = fmt.Errorf("proto: integer overflow")
)
var (
    ErrInvalidLengthProposerKv = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowProposerKv   = fmt.Errorf("proto: integer overflow")
)
var (
    ErrInvalidLengthState = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowState   = fmt.Errorf("proto: integer overflow")
)
var LeaseState_name = map[int32]string{
    0:  "ERROR",
    1:  "VALID",
    2:  "STASIS",
    3:  "EXPIRED",
    4:  "PROSCRIBED",
}
var LeaseState_value = map[string]int32{
    "ERROR":      0,
    "VALID":      1,
    "STASIS":     2,
    "EXPIRED":    3,
    "PROSCRIBED": 4,
}
var NodeLivenessStatus_name = map[int32]string{
    0:  "UNKNOWN",
    1:  "DEAD",
    2:  "UNAVAILABLE",
    3:  "LIVE",
    4:  "DECOMMISSIONING",
    5:  "DECOMMISSIONED",
}
var NodeLivenessStatus_value = map[string]int32{
    "UNKNOWN":         0,
    "DEAD":            1,
    "UNAVAILABLE":     2,
    "LIVE":            3,
    "DECOMMISSIONING": 4,
    "DECOMMISSIONED":  5,
}
var RangeLogEventType_name = map[int32]string{
    0:  "split",
    3:  "merge",
    1:  "add",
    2:  "remove",
}
var RangeLogEventType_value = map[string]int32{
    "split":  0,
    "merge":  3,
    "add":    1,
    "remove": 2,
}

func MaxRaftCommandFooterSize Uses

func MaxRaftCommandFooterSize() int

MaxRaftCommandFooterSize returns the maximum possible size of an encoded RaftCommandFooter proto.

type ChangeReplicas Uses

type ChangeReplicas struct {
    roachpb.ChangeReplicasTrigger `protobuf:"bytes,1,opt,name=trigger,proto3,embedded=trigger" json:"trigger"`
}

ChangeReplicas is emitted by a Replica which commits a transaction with a ChangeReplicasTrigger.

func (*ChangeReplicas) Descriptor Uses

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

func (*ChangeReplicas) Equal Uses

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

func (*ChangeReplicas) Marshal Uses

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

func (*ChangeReplicas) MarshalTo Uses

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

func (*ChangeReplicas) ProtoMessage Uses

func (*ChangeReplicas) ProtoMessage()

func (*ChangeReplicas) Reset Uses

func (m *ChangeReplicas) Reset()

func (*ChangeReplicas) Size Uses

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

func (*ChangeReplicas) Unmarshal Uses

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

func (*ChangeReplicas) XXX_DiscardUnknown Uses

func (m *ChangeReplicas) XXX_DiscardUnknown()

func (*ChangeReplicas) XXX_Marshal Uses

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

func (*ChangeReplicas) XXX_Merge Uses

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

func (*ChangeReplicas) XXX_Size Uses

func (m *ChangeReplicas) XXX_Size() int

func (*ChangeReplicas) XXX_Unmarshal Uses

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

type Compaction Uses

type Compaction struct {
    // bytes indicates the expected space reclamation from compaction.
    Bytes int64 `protobuf:"varint,1,opt,name=bytes,proto3" json:"bytes,omitempty"`
    // suggested_at is nanoseconds since the epoch.
    SuggestedAtNanos int64 `protobuf:"varint,2,opt,name=suggested_at_nanos,json=suggestedAtNanos,proto3" json:"suggested_at_nanos,omitempty"`
}

Compaction holds core details about a suggested compaction.

func (*Compaction) Descriptor Uses

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

func (*Compaction) Equal Uses

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

func (*Compaction) Marshal Uses

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

func (*Compaction) MarshalTo Uses

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

func (*Compaction) ProtoMessage Uses

func (*Compaction) ProtoMessage()

func (*Compaction) Reset Uses

func (m *Compaction) Reset()

func (*Compaction) Size Uses

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

func (*Compaction) String Uses

func (m *Compaction) String() string

func (*Compaction) Unmarshal Uses

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

func (*Compaction) XXX_DiscardUnknown Uses

func (m *Compaction) XXX_DiscardUnknown()

func (*Compaction) XXX_Marshal Uses

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

func (*Compaction) XXX_Merge Uses

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

func (*Compaction) XXX_Size Uses

func (m *Compaction) XXX_Size() int

func (*Compaction) XXX_Unmarshal Uses

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

type ComputeChecksum Uses

type ComputeChecksum struct {
    // ChecksumID is a handle by which the checksum can be retrieved in a later
    // CollectChecksum request.
    ChecksumID github_com_cockroachdb_cockroach_pkg_util_uuid.UUID `protobuf:"bytes,1,opt,name=checksum_id,json=checksumId,proto3,customtype=github.com/cockroachdb/cockroach/pkg/util/uuid.UUID" json:"checksum_id"`
    // The version used to pick the checksum method. Only when the version matches
    // that hardcoded in the binary will a computation be carried out.
    Version uint32 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"`
    // SaveSnapshot indicates that the snapshot used to compute the checksum
    // should be saved so that a diff of divergent replicas can later be computed.
    SaveSnapshot bool                 `protobuf:"varint,2,opt,name=save_snapshot,json=saveSnapshot,proto3" json:"save_snapshot,omitempty"`
    Mode         roachpb.ChecksumMode `protobuf:"varint,3,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 an
    // inconsistency and we want to preserve as much state as possible.
    Checkpoint bool `protobuf:"varint,4,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
    // Replicas processing this command which find themselves in this slice will
    // terminate. See `CheckConsistencyRequest.Terminate`.
    Terminate []roachpb.ReplicaDescriptor `protobuf:"bytes,6,rep,name=terminate,proto3" json:"terminate"`
}

ComputeChecksum is emitted when a ComputeChecksum request is evaluated. It instructs the replica to compute a checksum at the time the command is applied.

func (*ComputeChecksum) Descriptor Uses

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

func (*ComputeChecksum) Equal Uses

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

func (*ComputeChecksum) Marshal Uses

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

func (*ComputeChecksum) MarshalTo Uses

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

func (*ComputeChecksum) ProtoMessage Uses

func (*ComputeChecksum) ProtoMessage()

func (*ComputeChecksum) Reset Uses

func (m *ComputeChecksum) Reset()

func (*ComputeChecksum) Size Uses

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

func (*ComputeChecksum) String Uses

func (m *ComputeChecksum) String() string

func (*ComputeChecksum) Unmarshal Uses

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

func (*ComputeChecksum) XXX_DiscardUnknown Uses

func (m *ComputeChecksum) XXX_DiscardUnknown()

func (*ComputeChecksum) XXX_Marshal Uses

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

func (*ComputeChecksum) XXX_Merge Uses

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

func (*ComputeChecksum) XXX_Size Uses

func (m *ComputeChecksum) XXX_Size() int

func (*ComputeChecksum) XXX_Unmarshal Uses

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

type LatchManagerInfo Uses

type LatchManagerInfo struct {
    ReadCount  int64 `protobuf:"varint,1,opt,name=read_count,json=readCount,proto3" json:"read_count,omitempty"`
    WriteCount int64 `protobuf:"varint,2,opt,name=write_count,json=writeCount,proto3" json:"write_count,omitempty"`
}

LatchManagerInfo is used for reporting status information about a spanlatch manager out through the status server.

func (*LatchManagerInfo) Descriptor Uses

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

func (*LatchManagerInfo) Marshal Uses

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

func (*LatchManagerInfo) MarshalTo Uses

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

func (*LatchManagerInfo) ProtoMessage Uses

func (*LatchManagerInfo) ProtoMessage()

func (*LatchManagerInfo) Reset Uses

func (m *LatchManagerInfo) Reset()

func (*LatchManagerInfo) Size Uses

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

func (*LatchManagerInfo) String Uses

func (m *LatchManagerInfo) String() string

func (*LatchManagerInfo) Unmarshal Uses

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

func (*LatchManagerInfo) XXX_DiscardUnknown Uses

func (m *LatchManagerInfo) XXX_DiscardUnknown()

func (*LatchManagerInfo) XXX_Marshal Uses

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

func (*LatchManagerInfo) XXX_Merge Uses

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

func (*LatchManagerInfo) XXX_Size Uses

func (m *LatchManagerInfo) XXX_Size() int

func (*LatchManagerInfo) XXX_Unmarshal Uses

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

type LeaseState Uses

type LeaseState int32
const (
    // ERROR indicates that the lease can't be used or acquired.
    LeaseState_ERROR LeaseState = 0
    // VALID indicates that the lease can be used.
    LeaseState_VALID LeaseState = 1
    // STASIS indicates that the lease has not expired, but can't be
    // used because it is close to expiration (a stasis period at the
    // end of each lease is one of the ways we handle clock
    // uncertainty). A lease in STASIS may become VALID for the same
    // leaseholder after a successful RequestLease (for expiration-based
    // leases) or Heartbeat (for epoch-based leases). A lease may not
    // change hands while it is in stasis; would-be acquirers must wait
    // for the stasis period to expire.
    LeaseState_STASIS LeaseState = 2
    // EXPIRED indicates that the lease can't be used. An expired lease
    // may become VALID for the same leaseholder on RequestLease or
    // Heartbeat, or it may be replaced by a new leaseholder with a
    // RequestLease (for expiration-based leases) or
    // IncrementEpoch+RequestLease (for epoch-based leases).
    LeaseState_EXPIRED LeaseState = 3
    // PROSCRIBED indicates that the lease's proposed timestamp is
    // earlier than allowed. This is used to detect node restarts: a
    // node that has restarted will see its former incarnation's leases
    // as PROSCRIBED so it will renew them before using them. Note that
    // the PROSCRIBED state is only visible to the leaseholder; other
    // nodes will see this as a VALID lease.
    LeaseState_PROSCRIBED LeaseState = 4
)

func (LeaseState) EnumDescriptor Uses

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

func (LeaseState) String Uses

func (x LeaseState) String() string

type LeaseStatus Uses

type LeaseStatus struct {
    // Lease which this status describes.
    Lease roachpb.Lease `protobuf:"bytes,1,opt,name=lease,proto3" json:"lease"`
    // Timestamp that the lease was evaluated at.
    Timestamp hlc.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp"`
    // State of the lease at timestamp.
    State LeaseState `protobuf:"varint,3,opt,name=state,proto3,enum=cockroach.storage.LeaseState" json:"state,omitempty"`
    // Liveness if this is an epoch-based lease.
    Liveness Liveness `protobuf:"bytes,4,opt,name=liveness,proto3" json:"liveness"`
}

LeaseStatus holds the lease state, the timestamp at which the state is accurate, the lease and optionally the liveness if the lease is epoch-based.

func (*LeaseStatus) Descriptor Uses

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

func (*LeaseStatus) Marshal Uses

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

func (*LeaseStatus) MarshalTo Uses

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

func (*LeaseStatus) ProtoMessage Uses

func (*LeaseStatus) ProtoMessage()

func (*LeaseStatus) Reset Uses

func (m *LeaseStatus) Reset()

func (*LeaseStatus) Size Uses

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

func (*LeaseStatus) String Uses

func (m *LeaseStatus) String() string

func (*LeaseStatus) Unmarshal Uses

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

func (*LeaseStatus) XXX_DiscardUnknown Uses

func (m *LeaseStatus) XXX_DiscardUnknown()

func (*LeaseStatus) XXX_Marshal Uses

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

func (*LeaseStatus) XXX_Merge Uses

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

func (*LeaseStatus) XXX_Size Uses

func (m *LeaseStatus) XXX_Size() int

func (*LeaseStatus) XXX_Unmarshal Uses

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

type Liveness Uses

type Liveness struct {
    NodeID github_com_cockroachdb_cockroach_pkg_roachpb.NodeID `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.NodeID" json:"node_id,omitempty"`
    // Epoch is a monotonically-increasing value for node liveness. It
    // may be incremented if the liveness record expires (current time
    // is later than the expiration timestamp).
    Epoch int64 `protobuf:"varint,2,opt,name=epoch,proto3" json:"epoch,omitempty"`
    // The timestamp at which this liveness record expires.
    Expiration      hlc.LegacyTimestamp `protobuf:"bytes,3,opt,name=expiration,proto3" json:"expiration"`
    Draining        bool                `protobuf:"varint,4,opt,name=draining,proto3" json:"draining,omitempty"`
    Decommissioning bool                `protobuf:"varint,5,opt,name=decommissioning,proto3" json:"decommissioning,omitempty"`
}

Liveness holds information about a node's latest heartbeat and epoch.

NOTE: Care must be taken when changing the encoding of this proto because it is used as part of conditional put operations.

func NewPopulatedLiveness Uses

func NewPopulatedLiveness(r randyLiveness, easy bool) *Liveness

func (*Liveness) Descriptor Uses

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

func (*Liveness) IsDead Uses

func (l *Liveness) IsDead(now hlc.Timestamp, threshold time.Duration) bool

IsDead returns whether the node is considered dead at the given time with the given threshold.

func (*Liveness) IsLive Uses

func (l *Liveness) IsLive(now hlc.Timestamp, maxOffset time.Duration) bool

IsLive returns whether the node is considered live at the given time with the given clock offset.

func (*Liveness) LivenessStatus Uses

func (l *Liveness) LivenessStatus(
    now time.Time, threshold, maxOffset time.Duration,
) NodeLivenessStatus

LivenessStatus returns a NodeLivenessStatus enumeration value for this liveness based on the provided timestamp, threshold, and clock max offset.

func (*Liveness) Marshal Uses

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

func (*Liveness) MarshalTo Uses

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

func (*Liveness) ProtoMessage Uses

func (*Liveness) ProtoMessage()

func (*Liveness) Reset Uses

func (m *Liveness) Reset()

func (*Liveness) Size Uses

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

func (*Liveness) String Uses

func (m *Liveness) String() string

func (*Liveness) Unmarshal Uses

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

func (*Liveness) XXX_DiscardUnknown Uses

func (m *Liveness) XXX_DiscardUnknown()

func (*Liveness) XXX_Marshal Uses

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

func (*Liveness) XXX_Merge Uses

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

func (*Liveness) XXX_Size Uses

func (m *Liveness) XXX_Size() int

func (*Liveness) XXX_Unmarshal Uses

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

type LogicalOpLog Uses

type LogicalOpLog struct {
    Ops []enginepb.MVCCLogicalOp `protobuf:"bytes,1,rep,name=ops,proto3" json:"ops"`
}

LogicalOpLog is a log of logical MVCC operations. A wrapper message is used so that the absence of the field can be distinguished from a zero-length batch, and so structs containing pointers to it can be compared with the == operator.

func (*LogicalOpLog) Descriptor Uses

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

func (*LogicalOpLog) Marshal Uses

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

func (*LogicalOpLog) MarshalTo Uses

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

func (*LogicalOpLog) ProtoMessage Uses

func (*LogicalOpLog) ProtoMessage()

func (*LogicalOpLog) Reset Uses

func (m *LogicalOpLog) Reset()

func (*LogicalOpLog) Size Uses

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

func (*LogicalOpLog) String Uses

func (m *LogicalOpLog) String() string

func (*LogicalOpLog) Unmarshal Uses

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

func (*LogicalOpLog) XXX_DiscardUnknown Uses

func (m *LogicalOpLog) XXX_DiscardUnknown()

func (*LogicalOpLog) XXX_Marshal Uses

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

func (*LogicalOpLog) XXX_Merge Uses

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

func (*LogicalOpLog) XXX_Size Uses

func (m *LogicalOpLog) XXX_Size() int

func (*LogicalOpLog) XXX_Unmarshal Uses

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

type Merge Uses

type Merge struct {
    roachpb.MergeTrigger `protobuf:"bytes,1,opt,name=trigger,proto3,embedded=trigger" json:"trigger"`
}

Merge is emitted by a Replica which commits a transaction with a MergeTrigger (i.e. absorbs its right neighbor).

func (*Merge) Descriptor Uses

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

func (*Merge) Equal Uses

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

func (*Merge) Marshal Uses

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

func (*Merge) MarshalTo Uses

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

func (*Merge) ProtoMessage Uses

func (*Merge) ProtoMessage()

func (*Merge) Reset Uses

func (m *Merge) Reset()

func (*Merge) Size Uses

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

func (*Merge) String Uses

func (m *Merge) String() string

func (*Merge) Unmarshal Uses

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

func (*Merge) XXX_DiscardUnknown Uses

func (m *Merge) XXX_DiscardUnknown()

func (*Merge) XXX_Marshal Uses

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

func (*Merge) XXX_Merge Uses

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

func (*Merge) XXX_Size Uses

func (m *Merge) XXX_Size() int

func (*Merge) XXX_Unmarshal Uses

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

type NodeLivenessStatus Uses

type NodeLivenessStatus int32

NodeLivenessStatus describes the status of a node from the perspective of the liveness system.

const (
    NodeLivenessStatus_UNKNOWN NodeLivenessStatus = 0
    // DEAD indicates the node is considered dead.
    NodeLivenessStatus_DEAD NodeLivenessStatus = 1
    // UNAVAILABLE indicates that the node is unavailable - it has not updated its
    // liveness record recently enough to be considered live, but has not been
    // unavailable long enough to be considered dead.
    NodeLivenessStatus_UNAVAILABLE NodeLivenessStatus = 2
    // LIVE indicates a live node.
    NodeLivenessStatus_LIVE NodeLivenessStatus = 3
    // DECOMMISSIONING indicates a node that is in the decommissioning process.
    NodeLivenessStatus_DECOMMISSIONING NodeLivenessStatus = 4
    // DECOMMISSIONED indicates a node that has finished the decommissioning
    // process.
    NodeLivenessStatus_DECOMMISSIONED NodeLivenessStatus = 5
)

func (NodeLivenessStatus) EnumDescriptor Uses

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

func (NodeLivenessStatus) String Uses

func (x NodeLivenessStatus) String() string

type RaftCommand Uses

type RaftCommand struct {
    // proposer_replica is the replica which proposed this command, to be
    // used for lease validation.
    ProposerReplica roachpb.ReplicaDescriptor `protobuf:"bytes,2,opt,name=proposer_replica,json=proposerReplica,proto3" json:"proposer_replica"`
    // proposer_lease_seq is provided to verify at raft command apply-time
    // that the lease under which the command was proposed remains in effect.
    //
    // To see why lease verification downstream of Raft is required, consider the
    // following example:
    // - replica 1 receives a client request for a write
    // - replica 1 checks the lease; the write is permitted
    // - replica 1 proposes the command
    // - time passes, replica 2 commits a new lease
    // - the command applies on replica 1
    // - replica 2 serves anomalous reads which don't see the write
    // - the command applies on replica 2
    ProposerLeaseSequence github_com_cockroachdb_cockroach_pkg_roachpb.LeaseSequence `protobuf:"varint,6,opt,name=proposer_lease_sequence,json=proposerLeaseSequence,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.LeaseSequence" json:"proposer_lease_sequence,omitempty"`
    // deprecated_proposer_lease served the same purpose as proposer_lease_seq.
    // As of VersionLeaseSequence, it is no longer in use.
    //
    // However, unless we add a check that all existing Raft logs on all nodes
    // in the cluster contain only "new" leases, we won't be able to remove the
    // legacy code.
    DeprecatedProposerLease *roachpb.Lease `protobuf:"bytes,5,opt,name=deprecated_proposer_lease,json=deprecatedProposerLease,proto3" json:"deprecated_proposer_lease,omitempty"`
    // When the command is applied, its result is an error if the lease log
    // counter has already reached (or exceeded) max_lease_index.
    //
    // The lease index is a reorder protection mechanism - we don't want Raft
    // commands (proposed by a single node, the one with proposer_lease) executing
    // in a different order than the one in which the corresponding KV requests
    // were evaluated and the commands were proposed. This is important because
    // latching does not fully serialize commands - mostly when it comes to
    // updates to the internal state of the range (this should be re-evaluated
    // once proposer-evaluated KV is completed - see #10413).
    // Similar to the Raft applied index, it is strictly increasing, but may have
    // gaps. A command will only apply successfully if its max_lease_index has not
    // been surpassed by the Range's applied lease index (in which case the
    // command may need to be retried, that is, regenerated with a higher
    // max_lease_index). When the command applies, the new lease index will
    // increase to max_lease_index (so a potential later replay will fail).
    //
    // This mechanism was introduced as a simpler alternative to using the Raft
    // applied index, which is fraught with complexity due to the need to predict
    // exactly the log position at which a command will apply, even when the Raft
    // leader is not colocated with the lease holder (which usually proposes all
    // commands).
    //
    // Pinning the lease-index to the assigned slot (as opposed to allowing gaps
    // as we do now) is an interesting venue to explore from the standpoint of
    // parallelization: One could hope to enforce command ordering in that way
    // (without recourse to a higher-level locking primitive such as the command
    // queue). This is a hard problem: First of all, managing the pending
    // commands gets more involved; a command must not be removed if others have
    // been added after it, and on removal, the assignment counters must be
    // updated accordingly. Managing retry of proposals becomes trickier as
    // well as that uproots whatever ordering was originally envisioned.
    MaxLeaseIndex uint64 `protobuf:"varint,4,opt,name=max_lease_index,json=maxLeaseIndex,proto3" json:"max_lease_index,omitempty"`
    // replicated_eval_result is a set of structured information that instructs
    // replicated state changes to the part of a Range's replicated state machine
    // that exists outside of RocksDB.
    ReplicatedEvalResult ReplicatedEvalResult `protobuf:"bytes,13,opt,name=replicated_eval_result,json=replicatedEvalResult,proto3" json:"replicated_eval_result"`
    // write_batch is a RocksDB WriteBatch that will be applied to RockDB during
    // the application of the Raft command. The batch can be thought of as a
    // series of replicated instructions that inform a RocksDB engine on how to
    // change.
    WriteBatch *WriteBatch `protobuf:"bytes,14,opt,name=write_batch,json=writeBatch,proto3" json:"write_batch,omitempty"`
    // logical_op_log contains a series of logical MVCC operations that correspond
    // to the physical operations being made in the write_batch.
    LogicalOpLog *LogicalOpLog `protobuf:"bytes,15,opt,name=logical_op_log,json=logicalOpLog,proto3" json:"logical_op_log,omitempty"`
    // trace_data, if not empty, contains details of proposer's trace as returned by
    // Tracer.Inject(opentracing.TextMap). Used to create span for command
    // application on all the replicas that "follow from" the proposer.
    TraceData map[string]string `protobuf:"bytes,16,rep,name=trace_data,json=traceData,proto3" json:"trace_data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}

RaftCommand is the message written to the raft log. It contains some metadata about the proposal itself, then either a BatchRequest (legacy mode) or a ReplicatedEvalResult + WriteBatch (proposer-evaluated KV mode).

func (*RaftCommand) Descriptor Uses

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

func (*RaftCommand) Marshal Uses

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

func (*RaftCommand) MarshalTo Uses

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

func (*RaftCommand) ProtoMessage Uses

func (*RaftCommand) ProtoMessage()

func (*RaftCommand) Reset Uses

func (m *RaftCommand) Reset()

func (*RaftCommand) Size Uses

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

func (*RaftCommand) String Uses

func (m *RaftCommand) String() string

func (*RaftCommand) Unmarshal Uses

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

func (*RaftCommand) XXX_DiscardUnknown Uses

func (m *RaftCommand) XXX_DiscardUnknown()

func (*RaftCommand) XXX_Marshal Uses

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

func (*RaftCommand) XXX_Merge Uses

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

func (*RaftCommand) XXX_Size Uses

func (m *RaftCommand) XXX_Size() int

func (*RaftCommand) XXX_Unmarshal Uses

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

type RaftCommandFooter Uses

type RaftCommandFooter struct {
    MaxLeaseIndex uint64 `protobuf:"varint,4,opt,name=max_lease_index,json=maxLeaseIndex,proto3" json:"max_lease_index,omitempty"`
}

RaftCommandFooter contains a subset of the fields in RaftCommand. It is used to optimize a pattern where most of the fields in RaftCommand are marshaled outside of a heavily contended critical section, except for the fields in the footer, which are assigned and marhsaled inside of the critical section and appended to the marshaled byte buffer. This minimizes the memory allocation and marshaling work performed under lock.

func (*RaftCommandFooter) Descriptor Uses

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

func (*RaftCommandFooter) Marshal Uses

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

func (*RaftCommandFooter) MarshalTo Uses

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

func (*RaftCommandFooter) ProtoMessage Uses

func (*RaftCommandFooter) ProtoMessage()

func (*RaftCommandFooter) Reset Uses

func (m *RaftCommandFooter) Reset()

func (*RaftCommandFooter) Size Uses

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

func (*RaftCommandFooter) String Uses

func (m *RaftCommandFooter) String() string

func (*RaftCommandFooter) Unmarshal Uses

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

func (*RaftCommandFooter) XXX_DiscardUnknown Uses

func (m *RaftCommandFooter) XXX_DiscardUnknown()

func (*RaftCommandFooter) XXX_Marshal Uses

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

func (*RaftCommandFooter) XXX_Merge Uses

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

func (*RaftCommandFooter) XXX_Size Uses

func (m *RaftCommandFooter) XXX_Size() int

func (*RaftCommandFooter) XXX_Unmarshal Uses

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

type RangeInfo Uses

type RangeInfo struct {
    ReplicaState `protobuf:"bytes,1,opt,name=state,proto3,embedded=state" json:"state"`
    // The highest (and last) index in the Raft log.
    LastIndex  uint64 `protobuf:"varint,2,opt,name=last_index,json=lastIndex,proto3" json:"last_index,omitempty"`
    NumPending uint64 `protobuf:"varint,3,opt,name=num_pending,json=numPending,proto3" json:"num_pending,omitempty"`
    NumDropped uint64 `protobuf:"varint,5,opt,name=num_dropped,json=numDropped,proto3" json:"num_dropped,omitempty"`
    // raft_log_size may be inaccurate, see storage.Replica.mu.raftLogSizeTrusted.
    RaftLogSize        int64 `protobuf:"varint,6,opt,name=raft_log_size,json=raftLogSize,proto3" json:"raft_log_size,omitempty"`
    RaftLogSizeTrusted bool  `protobuf:"varint,10,opt,name=raft_log_size_trusted,json=raftLogSizeTrusted,proto3" json:"raft_log_size_trusted,omitempty"`
    // Approximately the amount of quota available.
    ApproximateProposalQuota int64 `protobuf:"varint,7,opt,name=approximate_proposal_quota,json=approximateProposalQuota,proto3" json:"approximate_proposal_quota,omitempty"`
    // Index for which quota has already been released.
    ProposalQuotaBaseIndex int64 `protobuf:"varint,14,opt,name=proposal_quota_base_index,json=proposalQuotaBaseIndex,proto3" json:"proposal_quota_base_index,omitempty"`
    // Quota amounts for commands which the leader has applied but for which we're
    // still waiting for followers to ack the corresponding entries. First entry
    // corresponds to base_index+1 above.
    ProposalQuotaReleaseQueue []int64 `protobuf:"varint,15,rep,packed,name=proposal_quota_release_queue,json=proposalQuotaReleaseQueue,proto3" json:"proposal_quota_release_queue,omitempty"`
    // The max size the range can grow to before it will be split.
    RangeMaxBytes int64 `protobuf:"varint,8,opt,name=range_max_bytes,json=rangeMaxBytes,proto3" json:"range_max_bytes,omitempty"`
    // The highest closed timestamp known to have data for this replica, taken
    // across the data received from all nodes. This does not reflect whether
    // the replica can use this closed timestamp (it may, for example, not have
    // caught up sufficiently to do so).
    NewestClosedTimestamp RangeInfo_CTEntry `protobuf:"bytes,11,opt,name=newest_closed_timestamp,json=newestClosedTimestamp,proto3" json:"newest_closed_timestamp"`
    // The closed timestamp active on the replica when the info was generated.
    // This is the actual timestamp at or below which requests can be served from
    // this replica at this moment (assuming it is not the leaseholder). This takes
    // into account the lease start time, the current lease applied index, and the
    // closed timestamp information received from other nodes, among other things.
    // In practice, this should not usually trail newest_closed_timestamp except
    // for a short moment after newest_closed_timestamp gets updated.
    ActiveClosedTimestamp hlc.Timestamp `protobuf:"bytes,12,opt,name=active_closed_timestamp,json=activeClosedTimestamp,proto3" json:"active_closed_timestamp"`
    // The number of Rangefeed registrations attached to the Replica.
    RangefeedRegistrations int64 `protobuf:"varint,13,opt,name=rangefeed_registrations,json=rangefeedRegistrations,proto3" json:"rangefeed_registrations,omitempty"`
}

RangeInfo is used for reporting status information about a range out through the status server.

func (*RangeInfo) Descriptor Uses

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

func (*RangeInfo) Equal Uses

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

func (*RangeInfo) Marshal Uses

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

func (*RangeInfo) MarshalTo Uses

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

func (*RangeInfo) ProtoMessage Uses

func (*RangeInfo) ProtoMessage()

func (*RangeInfo) Reset Uses

func (m *RangeInfo) Reset()

func (*RangeInfo) Size Uses

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

func (*RangeInfo) String Uses

func (m *RangeInfo) String() string

func (*RangeInfo) Unmarshal Uses

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

func (*RangeInfo) XXX_DiscardUnknown Uses

func (m *RangeInfo) XXX_DiscardUnknown()

func (*RangeInfo) XXX_Marshal Uses

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

func (*RangeInfo) XXX_Merge Uses

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

func (*RangeInfo) XXX_Size Uses

func (m *RangeInfo) XXX_Size() int

func (*RangeInfo) XXX_Unmarshal Uses

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

type RangeInfo_CTEntry Uses

type RangeInfo_CTEntry struct {
    NodeID          github_com_cockroachdb_cockroach_pkg_roachpb.NodeID `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.NodeID" json:"node_id,omitempty"`
    ClosedTimestamp hlc.Timestamp                                       `protobuf:"bytes,2,opt,name=closed_timestamp,json=closedTimestamp,proto3" json:"closed_timestamp"`
    MLAI            int64                                               `protobuf:"varint,3,opt,name=mlai,proto3" json:"mlai,omitempty"`
}

func (*RangeInfo_CTEntry) Descriptor Uses

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

func (*RangeInfo_CTEntry) Equal Uses

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

func (*RangeInfo_CTEntry) Marshal Uses

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

func (*RangeInfo_CTEntry) MarshalTo Uses

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

func (*RangeInfo_CTEntry) ProtoMessage Uses

func (*RangeInfo_CTEntry) ProtoMessage()

func (*RangeInfo_CTEntry) Reset Uses

func (m *RangeInfo_CTEntry) Reset()

func (*RangeInfo_CTEntry) Size Uses

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

func (*RangeInfo_CTEntry) String Uses

func (m *RangeInfo_CTEntry) String() string

func (*RangeInfo_CTEntry) Unmarshal Uses

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

func (*RangeInfo_CTEntry) XXX_DiscardUnknown Uses

func (m *RangeInfo_CTEntry) XXX_DiscardUnknown()

func (*RangeInfo_CTEntry) XXX_Marshal Uses

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

func (*RangeInfo_CTEntry) XXX_Merge Uses

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

func (*RangeInfo_CTEntry) XXX_Size Uses

func (m *RangeInfo_CTEntry) XXX_Size() int

func (*RangeInfo_CTEntry) XXX_Unmarshal Uses

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

type RangeLogEvent Uses

type RangeLogEvent struct {
    Timestamp    time.Time                                            `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
    RangeID      github_com_cockroachdb_cockroach_pkg_roachpb.RangeID `protobuf:"varint,2,opt,name=range_id,json=rangeId,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.RangeID" json:"range_id,omitempty"`
    StoreID      github_com_cockroachdb_cockroach_pkg_roachpb.StoreID `protobuf:"varint,3,opt,name=store_id,json=storeId,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.StoreID" json:"store_id,omitempty"`
    EventType    RangeLogEventType                                    `protobuf:"varint,4,opt,name=event_type,json=eventType,proto3,enum=cockroach.storage.RangeLogEventType" json:"event_type,omitempty"`
    OtherRangeID github_com_cockroachdb_cockroach_pkg_roachpb.RangeID `protobuf:"varint,5,opt,name=other_range_id,json=otherRangeId,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.RangeID" json:"other_range_id,omitempty"`
    Info         *RangeLogEvent_Info                                  `protobuf:"bytes,6,opt,name=info,proto3" json:"info,omitempty"`
}

func (*RangeLogEvent) Descriptor Uses

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

func (*RangeLogEvent) Marshal Uses

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

func (*RangeLogEvent) MarshalTo Uses

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

func (*RangeLogEvent) ProtoMessage Uses

func (*RangeLogEvent) ProtoMessage()

func (*RangeLogEvent) Reset Uses

func (m *RangeLogEvent) Reset()

func (*RangeLogEvent) Size Uses

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

func (*RangeLogEvent) String Uses

func (m *RangeLogEvent) String() string

func (*RangeLogEvent) Unmarshal Uses

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

func (*RangeLogEvent) XXX_DiscardUnknown Uses

func (m *RangeLogEvent) XXX_DiscardUnknown()

func (*RangeLogEvent) XXX_Marshal Uses

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

func (*RangeLogEvent) XXX_Merge Uses

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

func (*RangeLogEvent) XXX_Size Uses

func (m *RangeLogEvent) XXX_Size() int

func (*RangeLogEvent) XXX_Unmarshal Uses

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

type RangeLogEventReason Uses

type RangeLogEventReason string

RangeLogEventReason specifies the reason why a range-log event happened.

const (
    ReasonUnknown              RangeLogEventReason = ""
    ReasonRangeUnderReplicated RangeLogEventReason = "range under-replicated"
    ReasonRangeOverReplicated  RangeLogEventReason = "range over-replicated"
    ReasonStoreDead            RangeLogEventReason = "store dead"
    ReasonStoreDecommissioning RangeLogEventReason = "store decommissioning"
    ReasonRebalance            RangeLogEventReason = "rebalance"
    ReasonAdminRequest         RangeLogEventReason = "admin request"
    ReasonAbandonedLearner     RangeLogEventReason = "abandoned learner replica"
)

The set of possible reasons for range events to happen.

type RangeLogEventType Uses

type RangeLogEventType int32
const (
    // These are lower case to maintain compatibility with how they were
    // originally stored.
    // Split is the event type recorded when a range splits.
    RangeLogEventType_split RangeLogEventType = 0
    // Merge is the event type recorded when a range merges.
    RangeLogEventType_merge RangeLogEventType = 3
    // Add is the event type recorded when a range adds a new replica.
    RangeLogEventType_add RangeLogEventType = 1
    // Remove is the event type recorded when a range removed an existing replica.
    RangeLogEventType_remove RangeLogEventType = 2
)

func (RangeLogEventType) EnumDescriptor Uses

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

func (RangeLogEventType) String Uses

func (x RangeLogEventType) String() string

type RangeLogEvent_Info Uses

type RangeLogEvent_Info struct {
    UpdatedDesc    *roachpb.RangeDescriptor   `protobuf:"bytes,1,opt,name=updated_desc,json=updatedDesc,proto3" json:"UpdatedDesc,omitempty"`
    NewDesc        *roachpb.RangeDescriptor   `protobuf:"bytes,2,opt,name=new_desc,json=newDesc,proto3" json:"NewDesc,omitempty"`
    RemovedDesc    *roachpb.RangeDescriptor   `protobuf:"bytes,7,opt,name=removed_desc,json=removedDesc,proto3" json:"RemovedDesc,omitempty"`
    AddedReplica   *roachpb.ReplicaDescriptor `protobuf:"bytes,3,opt,name=added_replica,json=addedReplica,proto3" json:"AddReplica,omitempty"`
    RemovedReplica *roachpb.ReplicaDescriptor `protobuf:"bytes,4,opt,name=removed_replica,json=removedReplica,proto3" json:"RemovedReplica,omitempty"`
    Reason         RangeLogEventReason        `protobuf:"bytes,5,opt,name=reason,proto3,casttype=RangeLogEventReason" json:"Reason,omitempty"`
    Details        string                     `protobuf:"bytes,6,opt,name=details,proto3" json:"Details,omitempty"`
}

func (*RangeLogEvent_Info) Descriptor Uses

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

func (*RangeLogEvent_Info) Marshal Uses

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

func (*RangeLogEvent_Info) MarshalTo Uses

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

func (*RangeLogEvent_Info) ProtoMessage Uses

func (*RangeLogEvent_Info) ProtoMessage()

func (*RangeLogEvent_Info) Reset Uses

func (m *RangeLogEvent_Info) Reset()

func (*RangeLogEvent_Info) Size Uses

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

func (*RangeLogEvent_Info) String Uses

func (m *RangeLogEvent_Info) String() string

func (*RangeLogEvent_Info) Unmarshal Uses

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

func (*RangeLogEvent_Info) XXX_DiscardUnknown Uses

func (m *RangeLogEvent_Info) XXX_DiscardUnknown()

func (*RangeLogEvent_Info) XXX_Marshal Uses

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

func (*RangeLogEvent_Info) XXX_Merge Uses

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

func (*RangeLogEvent_Info) XXX_Size Uses

func (m *RangeLogEvent_Info) XXX_Size() int

func (*RangeLogEvent_Info) XXX_Unmarshal Uses

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

type ReplicaState Uses

type ReplicaState struct {
    // The highest (and last) index applied to the state machine.
    RaftAppliedIndex uint64 `protobuf:"varint,1,opt,name=raft_applied_index,json=raftAppliedIndex,proto3" json:"raft_applied_index,omitempty"`
    // The highest (and last) lease index applied to the state machine.
    LeaseAppliedIndex uint64 `protobuf:"varint,2,opt,name=lease_applied_index,json=leaseAppliedIndex,proto3" json:"lease_applied_index,omitempty"`
    // The Range descriptor.
    // The pointer may change, but the referenced RangeDescriptor struct itself
    // must be treated as immutable; it is leaked out of the lock.
    //
    // Changes of the descriptor should always go through one of the
    // (*Replica).setDesc* methods.
    Desc *roachpb.RangeDescriptor `protobuf:"bytes,3,opt,name=desc,proto3" json:"desc,omitempty"`
    // The latest range lease.
    //
    // Note that this message is both sent over the network and used to model
    // replica state in memory. In memory (storage.Replica.mu.state), the lease
    // is never nil (and never zero-valued), but it may be nil when sent over
    // the network as part of ReplicatedEvalResult.
    Lease *roachpb.Lease `protobuf:"bytes,4,opt,name=lease,proto3" json:"lease,omitempty"`
    // The truncation state of the Raft log.
    TruncatedState *roachpb.RaftTruncatedState `protobuf:"bytes,5,opt,name=truncated_state,json=truncatedState,proto3" json:"truncated_state,omitempty"`
    // gcThreshold is the GC threshold of the Range, typically updated when keys
    // are garbage collected. Reads and writes at timestamps <= this time will
    // not be served.
    GCThreshold *hlc.Timestamp `protobuf:"bytes,6,opt,name=gc_threshold,json=gcThreshold,proto3" json:"gc_threshold,omitempty" cockroachdb:"randnullable"`
    // deprecated_txn_span_gc_threshold is the (maximum) timestamp below which
    // transaction records may have been garbage collected (as measured by txn.LastActive()).
    // Transactions at lower timestamps must not be allowed to write their initial
    // transaction entry.
    // The field is no longer maintained. It is included in the proto only so that
    // it can be populated before being sent to 19.1 nodes to prevent them from
    // hitting assertion failures. It is stripped when received from other nodes.
    // TODO(nvanbenschoten): Remove the field entirely in 20.1.
    DeprecatedTxnSpanGCThreshold *hlc.Timestamp      `protobuf:"bytes,9,opt,name=deprecated_txn_span_gc_threshold,json=deprecatedTxnSpanGcThreshold,proto3" json:"deprecated_txn_span_gc_threshold,omitempty" cockroachdb:"randnullable"`
    Stats                        *enginepb.MVCCStats `protobuf:"bytes,7,opt,name=stats,proto3" json:"stats,omitempty"`
    // using_applied_state_key specifies whether the Range has been upgraded
    // to begin using the RangeAppliedState key. This key holds a combination
    // of the Raft applied index, the lease applied index, and the MVCC stats.
    //
    // When set to true in a ReplicatedEvalResult, the flag indicates that the
    // range should begin using the RangeAppliedState key. Handling of this flag
    // is idempotent by Replica state machines, meaning that it is ok for multiple
    // Raft commands to set it to true.
    UsingAppliedStateKey bool `protobuf:"varint,11,opt,name=using_applied_state_key,json=usingAppliedStateKey,proto3" json:"using_applied_state_key,omitempty"`
}

ReplicaState is the part of the Range Raft state machine which is cached in memory and which is manipulated exclusively through consensus.

The struct is also used to transfer state to Replicas in the context of proposer-evaluated Raft, in which case it does not represent a complete state but instead an update to be applied to an existing state, with each field specified in the update overwriting its counterpart on the receiving ReplicaState.

For the ReplicaState persisted on the Replica, all optional fields are populated (i.e. no nil pointers or enums with the default value).

func (*ReplicaState) Descriptor Uses

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

func (*ReplicaState) Equal Uses

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

func (*ReplicaState) Marshal Uses

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

func (*ReplicaState) MarshalTo Uses

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

func (*ReplicaState) ProtoMessage Uses

func (*ReplicaState) ProtoMessage()

func (*ReplicaState) Reset Uses

func (m *ReplicaState) Reset()

func (*ReplicaState) Size Uses

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

func (*ReplicaState) String Uses

func (m *ReplicaState) String() string

func (*ReplicaState) Unmarshal Uses

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

func (*ReplicaState) XXX_DiscardUnknown Uses

func (m *ReplicaState) XXX_DiscardUnknown()

func (*ReplicaState) XXX_Marshal Uses

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

func (*ReplicaState) XXX_Merge Uses

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

func (*ReplicaState) XXX_Size Uses

func (m *ReplicaState) XXX_Size() int

func (*ReplicaState) XXX_Unmarshal Uses

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

type ReplicatedEvalResult Uses

type ReplicatedEvalResult struct {
    // Whether to block concurrent readers while processing the proposal data.
    BlockReads bool `protobuf:"varint,1,opt,name=block_reads,json=blockReads,proto3" json:"block_reads,omitempty"`
    // Updates to the Replica's ReplicaState. By convention and as outlined on
    // the comment on the ReplicaState message, this field is sparsely populated
    // and any field set overwrites the corresponding field in the state, perhaps
    // with additional side effects (for instance on a descriptor update).
    State           *ReplicaState    `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
    Split           *Split           `protobuf:"bytes,3,opt,name=split,proto3" json:"split,omitempty"`
    Merge           *Merge           `protobuf:"bytes,4,opt,name=merge,proto3" json:"merge,omitempty"`
    ComputeChecksum *ComputeChecksum `protobuf:"bytes,21,opt,name=compute_checksum,json=computeChecksum,proto3" json:"compute_checksum,omitempty"`
    IsLeaseRequest  bool             `protobuf:"varint,6,opt,name=is_lease_request,json=isLeaseRequest,proto3" json:"is_lease_request,omitempty"`
    // Duplicates BatchRequest.Timestamp for proposer-evaluated KV. Used
    // to verify the validity of the command (for lease coverage and GC
    // threshold).
    Timestamp hlc.Timestamp `protobuf:"bytes,8,opt,name=timestamp,proto3" json:"timestamp"`
    // The stats delta corresponding to the data in this WriteBatch. On
    // a split, contains only the contributions to the left-hand side.
    DeprecatedDelta *enginepb.MVCCStats              `protobuf:"bytes,10,opt,name=deprecated_delta,json=deprecatedDelta,proto3" json:"deprecated_delta,omitempty"`
    Delta           enginepb.MVCCStatsDelta          `protobuf:"bytes,18,opt,name=delta,proto3" json:"delta"`
    ChangeReplicas  *ChangeReplicas                  `protobuf:"bytes,12,opt,name=change_replicas,json=changeReplicas,proto3" json:"change_replicas,omitempty"`
    RaftLogDelta    int64                            `protobuf:"varint,13,opt,name=raft_log_delta,json=raftLogDelta,proto3" json:"raft_log_delta,omitempty"`
    AddSSTable      *ReplicatedEvalResult_AddSSTable `protobuf:"bytes,17,opt,name=add_sstable,json=addSstable,proto3" json:"add_sstable,omitempty"`
    // suggested_compactions are sent to the engine's compactor to
    // reclaim storage space after garbage collection or cleared /
    // rebalanced ranges.
    SuggestedCompactions []SuggestedCompaction `protobuf:"bytes,19,rep,name=suggested_compactions,json=suggestedCompactions,proto3" json:"suggested_compactions"`
    // This is the proposal timestamp for the active lease while evaluating a lease request.
    // It will be used to make sure we know if a lease was extended after we sent out the request
    // but before we tried to apply it.
    PrevLeaseProposal *hlc.Timestamp `protobuf:"bytes,20,opt,name=prev_lease_proposal,json=prevLeaseProposal,proto3" json:"prev_lease_proposal,omitempty"`
}

ReplicatedEvalResult is the structured information which together with a RocksDB WriteBatch constitutes the proposal payload in proposer-evaluated KV. For the majority of proposals, we expect ReplicatedEvalResult to be trivial; only changes to the metadata state (splits, merges, rebalances, leases, log truncation, ...) of the Replica or certain special commands must sideline information here based on which all Replicas must take action.

func (*ReplicatedEvalResult) Descriptor Uses

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

func (*ReplicatedEvalResult) Equal Uses

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

func (*ReplicatedEvalResult) Marshal Uses

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

func (*ReplicatedEvalResult) MarshalTo Uses

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

func (*ReplicatedEvalResult) ProtoMessage Uses

func (*ReplicatedEvalResult) ProtoMessage()

func (*ReplicatedEvalResult) Reset Uses

func (m *ReplicatedEvalResult) Reset()

func (*ReplicatedEvalResult) Size Uses

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

func (*ReplicatedEvalResult) String Uses

func (m *ReplicatedEvalResult) String() string

func (*ReplicatedEvalResult) Unmarshal Uses

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

func (*ReplicatedEvalResult) XXX_DiscardUnknown Uses

func (m *ReplicatedEvalResult) XXX_DiscardUnknown()

func (*ReplicatedEvalResult) XXX_Marshal Uses

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

func (*ReplicatedEvalResult) XXX_Merge Uses

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

func (*ReplicatedEvalResult) XXX_Size Uses

func (m *ReplicatedEvalResult) XXX_Size() int

func (*ReplicatedEvalResult) XXX_Unmarshal Uses

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

type ReplicatedEvalResult_AddSSTable Uses

type ReplicatedEvalResult_AddSSTable struct {
    Data  []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
    CRC32 uint32 `protobuf:"varint,2,opt,name=crc32,proto3" json:"crc32,omitempty"`
}

AddSSTable is a side effect that must execute before the Raft application is committed. It must be idempotent to account for an ill-timed crash after applying the side effect, but before committing the batch.

TODO(tschottdorf): additionally, after the crash, the node must not serve traffic until the persisted committed log has fully applied. Otherwise, we risk exposing data created through such a side effect whose corresponding Raft command hasn't committed yet. This isn't so much an issue with AddSSTable since these Ranges are not user-visible, but it is a general concern assuming other such side effects are added.

func (*ReplicatedEvalResult_AddSSTable) Descriptor Uses

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

func (*ReplicatedEvalResult_AddSSTable) Equal Uses

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

func (*ReplicatedEvalResult_AddSSTable) Marshal Uses

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

func (*ReplicatedEvalResult_AddSSTable) MarshalTo Uses

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

func (*ReplicatedEvalResult_AddSSTable) ProtoMessage Uses

func (*ReplicatedEvalResult_AddSSTable) ProtoMessage()

func (*ReplicatedEvalResult_AddSSTable) Reset Uses

func (m *ReplicatedEvalResult_AddSSTable) Reset()

func (*ReplicatedEvalResult_AddSSTable) Size Uses

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

func (*ReplicatedEvalResult_AddSSTable) String Uses

func (m *ReplicatedEvalResult_AddSSTable) String() string

func (*ReplicatedEvalResult_AddSSTable) Unmarshal Uses

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

func (*ReplicatedEvalResult_AddSSTable) XXX_DiscardUnknown Uses

func (m *ReplicatedEvalResult_AddSSTable) XXX_DiscardUnknown()

func (*ReplicatedEvalResult_AddSSTable) XXX_Marshal Uses

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

func (*ReplicatedEvalResult_AddSSTable) XXX_Merge Uses

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

func (*ReplicatedEvalResult_AddSSTable) XXX_Size Uses

func (m *ReplicatedEvalResult_AddSSTable) XXX_Size() int

func (*ReplicatedEvalResult_AddSSTable) XXX_Unmarshal Uses

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

type Split Uses

type Split struct {
    roachpb.SplitTrigger `protobuf:"bytes,1,opt,name=trigger,proto3,embedded=trigger" json:"trigger"`
    // RHSDelta holds the statistics for what was written to what is now the
    // right-hand side of the split during the batch which executed it.
    // The on-disk state of the right-hand side is already correct, but the
    // Store must learn about this delta to update its counters appropriately.
    RHSDelta enginepb.MVCCStats `protobuf:"bytes,2,opt,name=rhs_delta,json=rhsDelta,proto3" json:"rhs_delta"`
}

Split is emitted when a Replica commits a split trigger. It signals that the Replica has prepared the on-disk state for both the left and right hand sides of the split, and that the left hand side Replica should be updated as well as the right hand side created.

func (*Split) Descriptor Uses

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

func (*Split) Equal Uses

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

func (*Split) Marshal Uses

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

func (*Split) MarshalTo Uses

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

func (*Split) ProtoMessage Uses

func (*Split) ProtoMessage()

func (*Split) Reset Uses

func (m *Split) Reset()

func (*Split) Size Uses

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

func (*Split) String Uses

func (m *Split) String() string

func (*Split) Unmarshal Uses

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

func (*Split) XXX_DiscardUnknown Uses

func (m *Split) XXX_DiscardUnknown()

func (*Split) XXX_Marshal Uses

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

func (*Split) XXX_Merge Uses

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

func (*Split) XXX_Size Uses

func (m *Split) XXX_Size() int

func (*Split) XXX_Unmarshal Uses

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

type SuggestedCompaction Uses

type SuggestedCompaction struct {
    StartKey   github_com_cockroachdb_cockroach_pkg_roachpb.Key `protobuf:"bytes,1,opt,name=start_key,json=startKey,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.Key" json:"start_key,omitempty"`
    EndKey     github_com_cockroachdb_cockroach_pkg_roachpb.Key `protobuf:"bytes,2,opt,name=end_key,json=endKey,proto3,casttype=github.com/cockroachdb/cockroach/pkg/roachpb.Key" json:"end_key,omitempty"`
    Compaction `protobuf:"bytes,3,opt,name=compaction,proto3,embedded=compaction" json:"compaction"`
}

SuggestedCompaction holds start and end keys in conjunction with the compaction details.

func (*SuggestedCompaction) Descriptor Uses

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

func (*SuggestedCompaction) Equal Uses

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

func (*SuggestedCompaction) Marshal Uses

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

func (*SuggestedCompaction) MarshalTo Uses

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

func (*SuggestedCompaction) ProtoMessage Uses

func (*SuggestedCompaction) ProtoMessage()

func (*SuggestedCompaction) Reset Uses

func (m *SuggestedCompaction) Reset()

func (*SuggestedCompaction) Size Uses

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

func (*SuggestedCompaction) String Uses

func (m *SuggestedCompaction) String() string

func (*SuggestedCompaction) Unmarshal Uses

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

func (*SuggestedCompaction) XXX_DiscardUnknown Uses

func (m *SuggestedCompaction) XXX_DiscardUnknown()

func (*SuggestedCompaction) XXX_Marshal Uses

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

func (*SuggestedCompaction) XXX_Merge Uses

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

func (*SuggestedCompaction) XXX_Size Uses

func (m *SuggestedCompaction) XXX_Size() int

func (*SuggestedCompaction) XXX_Unmarshal Uses

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

type WriteBatch Uses

type WriteBatch struct {
    Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}

WriteBatch is the serialized representation of a RocksDB write batch. A wrapper message is used so that the absence of the field can be distinguished from a zero-length batch, and so structs containing pointers to it can be compared with the == operator.

func (*WriteBatch) Descriptor Uses

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

func (*WriteBatch) Marshal Uses

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

func (*WriteBatch) MarshalTo Uses

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

func (*WriteBatch) ProtoMessage Uses

func (*WriteBatch) ProtoMessage()

func (*WriteBatch) Reset Uses

func (m *WriteBatch) Reset()

func (*WriteBatch) Size Uses

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

func (*WriteBatch) String Uses

func (m *WriteBatch) String() string

func (*WriteBatch) Unmarshal Uses

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

func (*WriteBatch) XXX_DiscardUnknown Uses

func (m *WriteBatch) XXX_DiscardUnknown()

func (*WriteBatch) XXX_Marshal Uses

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

func (*WriteBatch) XXX_Merge Uses

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

func (*WriteBatch) XXX_Size Uses

func (m *WriteBatch) XXX_Size() int

func (*WriteBatch) XXX_Unmarshal Uses

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

Package storagepb imports 13 packages (graph) and is imported by 28 packages. Updated 2019-11-08. Refresh now. Tools for package owners.