Documentation
¶
Index ¶
- func EncodePrimaryKey(v any, packer *types.Packer) []byte
- func EncodePrimaryKeyVector(vec *vector.Vector, packer *types.Packer) (ret [][]byte)
- func IsBlkTable(name string) bool
- func IsMetaTable(name string) bool
- func IsSegTable(name string) bool
- type BlockEntry
- type BlocksIter
- type Partition
- type PartitionState
- func (p *PartitionState) AppendCheckpoint(checkpoint string)
- func (p *PartitionState) BlockVisible(blockID types.Blockid, ts types.TS) bool
- func (p *PartitionState) ConsumeCheckpoints(fn func(checkpoint string) error) error
- func (p *PartitionState) Copy() *PartitionState
- func (p *PartitionState) HandleLogtailEntry(ctx context.Context, entry *api.Entry, primarySeqnum int, packer *types.Packer)
- func (p *PartitionState) HandleMetadataDelete(ctx context.Context, input *api.Batch)
- func (p *PartitionState) HandleMetadataInsert(ctx context.Context, tableId uint64, input *api.Batch)
- func (p *PartitionState) HandleRowsDelete(ctx context.Context, input *api.Batch)
- func (p *PartitionState) HandleRowsInsert(ctx context.Context, input *api.Batch, primarySeqnum int, packer *types.Packer) (primaryKeys [][]byte)
- func (p *PartitionState) NewBlocksIter(ts types.TS) *blocksIter
- func (p *PartitionState) NewDirtyBlocksIter() *dirtyBlocksIter
- func (p *PartitionState) NewPrimaryKeyIter(ts types.TS, spec PrimaryKeyMatchSpec) *primaryKeyIter
- func (p *PartitionState) NewRowsIter(ts types.TS, blockID *types.Blockid, iterDeleted bool) *rowsIter
- func (p *PartitionState) PrimaryKeyMayBeModified(tableID uint64, from types.TS, to types.TS, key []byte) bool
- func (p *PartitionState) PrimaryKeysMayBeModified(tableID uint64, from types.TS, to types.TS, keysVector *vector.Vector, ...) bool
- func (p *PartitionState) RowExists(rowID types.Rowid, ts types.TS) bool
- type PrimaryIndexEntry
- type PrimaryKeyMatchSpec
- type RowEntry
- type RowID
- type RowsIter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodePrimaryKeyVector ¶
func IsBlkTable ¶
func IsMetaTable ¶
func IsSegTable ¶
Types ¶
type BlockEntry ¶
func (BlockEntry) Less ¶
func (b BlockEntry) Less(than BlockEntry) bool
type BlocksIter ¶
type BlocksIter interface { Next() bool Close() error Entry() BlockEntry }
type Partition ¶
type Partition struct { TS timestamp.Timestamp // last updated timestamp // contains filtered or unexported fields }
a partition corresponds to a dn
func NewPartition ¶
func NewPartition() *Partition
func (*Partition) CheckPoint ¶
func (*Partition) MutateState ¶
func (p *Partition) MutateState() (*PartitionState, func())
func (*Partition) Snapshot ¶
func (p *Partition) Snapshot() *PartitionState
type PartitionState ¶
type PartitionState struct {
// contains filtered or unexported fields
}
func NewPartitionState ¶
func NewPartitionState(noData bool) *PartitionState
func (*PartitionState) AppendCheckpoint ¶
func (p *PartitionState) AppendCheckpoint(checkpoint string)
func (*PartitionState) BlockVisible ¶
func (*PartitionState) ConsumeCheckpoints ¶
func (p *PartitionState) ConsumeCheckpoints( fn func(checkpoint string) error, ) error
func (*PartitionState) Copy ¶
func (p *PartitionState) Copy() *PartitionState
func (*PartitionState) HandleLogtailEntry ¶
func (*PartitionState) HandleMetadataDelete ¶
func (p *PartitionState) HandleMetadataDelete(ctx context.Context, input *api.Batch)
func (*PartitionState) HandleMetadataInsert ¶
func (*PartitionState) HandleRowsDelete ¶
func (p *PartitionState) HandleRowsDelete(ctx context.Context, input *api.Batch)
func (*PartitionState) HandleRowsInsert ¶
func (*PartitionState) NewBlocksIter ¶
func (p *PartitionState) NewBlocksIter(ts types.TS) *blocksIter
func (*PartitionState) NewDirtyBlocksIter ¶
func (p *PartitionState) NewDirtyBlocksIter() *dirtyBlocksIter
func (*PartitionState) NewPrimaryKeyIter ¶
func (p *PartitionState) NewPrimaryKeyIter( ts types.TS, spec PrimaryKeyMatchSpec, ) *primaryKeyIter
func (*PartitionState) NewRowsIter ¶
func (*PartitionState) PrimaryKeyMayBeModified ¶
func (*PartitionState) PrimaryKeysMayBeModified ¶
type PrimaryIndexEntry ¶
type PrimaryIndexEntry struct { Bytes []byte RowEntryID int64 // fields for validating BlockID types.Blockid RowID types.Rowid }
func (*PrimaryIndexEntry) Less ¶
func (p *PrimaryIndexEntry) Less(than *PrimaryIndexEntry) bool
type PrimaryKeyMatchSpec ¶
func Exact ¶
func Exact(key []byte) PrimaryKeyMatchSpec
func MinMax ¶
func MinMax(min []byte, max []byte) PrimaryKeyMatchSpec
func Prefix ¶
func Prefix(prefix []byte) PrimaryKeyMatchSpec
type RowEntry ¶
type RowEntry struct { BlockID types.Blockid // we need to iter by block id, so put it first to allow faster iteration RowID types.Rowid Time types.TS ID int64 // a unique version id, for primary index building and validating Deleted bool Batch *batch.Batch Offset int64 PrimaryIndexBytes []byte }
RowEntry represents a version of a row
Click to show internal directories.
Click to hide internal directories.