cockroach: github.com/abhinavdahiya/cockroach/storage/storagebase Index | Files

package storagebase

import "github.com/abhinavdahiya/cockroach/storage/storagebase"

Package storagebase is a generated protocol buffer package.

It is generated from these files:

cockroach/storage/storagebase/state.proto

It has these top-level messages:

ReplicaState
RangeInfo

Index

Package Files

base.go state.pb.go

Variables

var (
    ErrInvalidLengthState = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowState   = fmt.Errorf("proto: integer overflow")
)

type CmdIDKey Uses

type CmdIDKey string

CmdIDKey is a Raft command id.

type FilterArgs Uses

type FilterArgs struct {
    Ctx   context.Context
    CmdID CmdIDKey
    Index int
    Sid   roachpb.StoreID
    Req   roachpb.Request
    Hdr   roachpb.Header
}

FilterArgs groups the arguments to a ReplicaCommandFilter.

func (*FilterArgs) InRaftCmd Uses

func (f *FilterArgs) InRaftCmd() bool

InRaftCmd returns true if the filter is running in the context of a Raft command (it could be running outside of one, for example for a read).

type RangeInfo Uses

type RangeInfo struct {
    ReplicaState `protobuf:"bytes,1,opt,name=state,embedded=state" json:"state"`
    // The highest (and last) index in the Raft log.
    LastIndex        uint64                       `protobuf:"varint,2,opt,name=lastIndex,proto3" json:"lastIndex,omitempty"`
    NumPending       uint64                       `protobuf:"varint,3,opt,name=num_pending,json=numPending,proto3" json:"num_pending,omitempty"`
    LastVerification cockroach_util_hlc.Timestamp `protobuf:"bytes,4,opt,name=last_verification,json=lastVerification" json:"last_verification"`
    NumDropped       uint64                       `protobuf:"varint,5,opt,name=num_dropped,json=numDropped,proto3" json:"num_dropped,omitempty"`
    // raft_log_size may be initially inaccurate after a server restart.
    // See storage.Replica.mu.raftLogSize.
    RaftLogSize int64 `protobuf:"varint,6,opt,name=raft_log_size,json=raftLogSize,proto3" json:"raft_log_size,omitempty"`
}

func (*RangeInfo) Descriptor Uses

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

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

type ReplicaCommandFilter Uses

type ReplicaCommandFilter func(args FilterArgs) *roachpb.Error

ReplicaCommandFilter may be used in tests through the StorageTestingMocker to intercept the handling of commands and artificially generate errors. Return nil to continue with regular processing or non-nil to terminate processing with the returned error. Note that in a multi-replica test this filter will be run once for each replica and must produce consistent results each time.

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 normally go through one of the
    // (*Replica).setDesc* methods.
    Desc *cockroach_roachpb.RangeDescriptor `protobuf:"bytes,3,opt,name=desc" json:"desc,omitempty"`
    // The latest lease, if any.
    Lease *cockroach_roachpb1.Lease `protobuf:"bytes,4,opt,name=lease" json:"lease,omitempty"`
    // The truncation state of the Raft log.
    TruncatedState *cockroach_roachpb2.RaftTruncatedState `protobuf:"bytes,5,opt,name=truncated_state,json=truncatedState" 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 cockroach_util_hlc.Timestamp                `protobuf:"bytes,6,opt,name=gc_threshold,json=gcThreshold" json:"gc_threshold"`
    Stats       cockroach_storage_engine_enginepb.MVCCStats `protobuf:"bytes,7,opt,name=stats" json:"stats"`
    Frozen      bool                                        `protobuf:"varint,8,opt,name=frozen,proto3" json:"frozen,omitempty"`
}

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

func (*ReplicaState) Descriptor Uses

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

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

Package storagebase imports 8 packages (graph). Updated 2017-03-13. Refresh now. Tools for package owners. This is a dead-end fork (no commits since the fork).