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 IsObjTable(name string) bool
- type BlockDeltaEntry
- type BlockEntry
- type BlocksIter
- type ObjectEntry
- type ObjectIndexByCreateTSEntry
- type ObjectIndexByTSEntry
- type ObjectInfo
- type ObjectsIter
- type Partition
- func (*Partition) CheckPoint(ctx context.Context, ts timestamp.Timestamp) error
- func (p *Partition) ConsumeCheckpoints(ctx context.Context, fn func(checkpoint string, state *PartitionState) error) (err error)
- func (p *Partition) Lock(ctx context.Context) error
- func (p *Partition) MutateState() (*PartitionState, func())
- func (p *Partition) Snapshot() *PartitionState
- func (p *Partition) Truncate(ctx context.Context, ids [2]uint64, ts types.TS) error
- func (p *Partition) Unlock()
- type PartitionState
- func (p *PartitionState) AppendCheckpoint(checkpoint string, partiton *Partition)
- func (p *PartitionState) ApproxObjectsNum() int
- func (p *PartitionState) BlockPersisted(blockID types.Blockid) bool
- func (p *PartitionState) Copy() *PartitionState
- func (p *PartitionState) GetBockDeltaLoc(bid types.Blockid) (catalog.ObjectLocation, types.TS, bool)
- func (p *PartitionState) GetChangedObjsBetween(begin types.TS, end types.TS) (deleted []objectio.ObjectNameShort, inserted []objectio.ObjectNameShort)
- func (p *PartitionState) GetObject(name objectio.ObjectNameShort) (ObjectInfo, bool)
- func (p *PartitionState) HandleLogtailEntry(ctx context.Context, fs fileservice.FileService, entry *api.Entry, ...)
- func (p *PartitionState) HandleMetadataDelete(ctx context.Context, input *api.Batch)
- func (p *PartitionState) HandleMetadataInsert(ctx context.Context, fs fileservice.FileService, input *api.Batch)
- func (p *PartitionState) HandleObjectDelete(bat *api.Batch)
- func (p *PartitionState) HandleObjectInsert(bat *api.Batch)
- func (p *PartitionState) HandleRowsDelete(ctx context.Context, input *api.Batch, packer *types.Packer)
- func (p *PartitionState) HandleRowsInsert(ctx context.Context, input *api.Batch, primarySeqnum int, packer *types.Packer) (primaryKeys [][]byte)
- func (p *PartitionState) NewDirtyBlocksIter() *dirtyBlocksIter
- func (p *PartitionState) NewObjectsIter(ts types.TS) (*objectsIter, error)
- func (p *PartitionState) NewPrimaryKeyDelIter(ts types.TS, spec PrimaryKeyMatchSpec, bid types.Blockid) *primaryKeyDelIter
- 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(from types.TS, to types.TS, keys [][]byte) 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 IsObjTable ¶ added in v1.1.0
Types ¶
type BlockDeltaEntry ¶ added in v1.0.0
type BlockDeltaEntry struct { BlockID types.Blockid CommitTs types.TS DeltaLoc catalog.ObjectLocation }
func (BlockDeltaEntry) DeltaLocation ¶ added in v1.0.0
func (b BlockDeltaEntry) DeltaLocation() objectio.Location
func (BlockDeltaEntry) Less ¶ added in v1.0.0
func (b BlockDeltaEntry) Less(than BlockDeltaEntry) bool
type BlockEntry ¶
func (BlockEntry) Less ¶
func (b BlockEntry) Less(than BlockEntry) bool
type ObjectEntry ¶ added in v1.0.0
type ObjectEntry struct {
ObjectInfo
}
func (ObjectEntry) Less ¶ added in v1.0.0
func (o ObjectEntry) Less(than ObjectEntry) bool
func (ObjectEntry) Location ¶ added in v1.0.0
func (o ObjectEntry) Location() objectio.Location
type ObjectIndexByCreateTSEntry ¶ added in v1.0.0
type ObjectIndexByCreateTSEntry struct {
ObjectInfo
}
func (ObjectIndexByCreateTSEntry) Less ¶ added in v1.0.0
func (o ObjectIndexByCreateTSEntry) Less(than ObjectIndexByCreateTSEntry) bool
type ObjectIndexByTSEntry ¶ added in v1.0.0
type ObjectIndexByTSEntry struct { Time types.TS // insert or delete time ShortObjName objectio.ObjectNameShort IsDelete bool IsAppendable bool }
func (ObjectIndexByTSEntry) Less ¶ added in v1.0.0
func (b ObjectIndexByTSEntry) Less(than ObjectIndexByTSEntry) bool
type ObjectInfo ¶ added in v1.0.0
type ObjectInfo struct { objectio.ObjectStats EntryState bool Sorted bool HasDeltaLoc bool CommitTS types.TS CreateTime types.TS DeleteTime types.TS }
func (ObjectInfo) Location ¶ added in v1.0.0
func (o ObjectInfo) Location() objectio.Location
func (ObjectInfo) String ¶ added in v1.1.0
func (o ObjectInfo) String() string
type ObjectsIter ¶ added in v1.0.0
type ObjectsIter interface { Next() bool Close() error Entry() ObjectEntry }
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) ConsumeCheckpoints ¶ added in v1.0.0
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, partiton *Partition)
func (*PartitionState) ApproxObjectsNum ¶ added in v1.0.0
func (p *PartitionState) ApproxObjectsNum() int
not accurate! only used by stats
func (*PartitionState) BlockPersisted ¶ added in v1.0.0
func (p *PartitionState) BlockPersisted(blockID types.Blockid) bool
func (*PartitionState) Copy ¶
func (p *PartitionState) Copy() *PartitionState
func (*PartitionState) GetBockDeltaLoc ¶ added in v1.0.0
func (p *PartitionState) GetBockDeltaLoc(bid types.Blockid) (catalog.ObjectLocation, types.TS, bool)
func (*PartitionState) GetChangedObjsBetween ¶ added in v1.0.0
func (p *PartitionState) GetChangedObjsBetween( begin types.TS, end types.TS, ) ( deleted []objectio.ObjectNameShort, inserted []objectio.ObjectNameShort, )
GetChangedObjsBetween get changed objects between [begin, end]
func (*PartitionState) GetObject ¶ added in v1.0.0
func (p *PartitionState) GetObject(name objectio.ObjectNameShort) (ObjectInfo, bool)
func (*PartitionState) HandleLogtailEntry ¶
func (p *PartitionState) HandleLogtailEntry( ctx context.Context, fs fileservice.FileService, entry *api.Entry, primarySeqnum int, packer *types.Packer, )
func (*PartitionState) HandleMetadataDelete ¶
func (p *PartitionState) HandleMetadataDelete(ctx context.Context, input *api.Batch)
func (*PartitionState) HandleMetadataInsert ¶
func (p *PartitionState) HandleMetadataInsert( ctx context.Context, fs fileservice.FileService, input *api.Batch)
func (*PartitionState) HandleObjectDelete ¶ added in v1.1.0
func (p *PartitionState) HandleObjectDelete(bat *api.Batch)
func (*PartitionState) HandleObjectInsert ¶ added in v1.1.0
func (p *PartitionState) HandleObjectInsert(bat *api.Batch)
func (*PartitionState) HandleRowsDelete ¶
func (*PartitionState) HandleRowsInsert ¶
func (*PartitionState) NewDirtyBlocksIter ¶
func (p *PartitionState) NewDirtyBlocksIter() *dirtyBlocksIter
func (*PartitionState) NewObjectsIter ¶ added in v1.0.0
func (p *PartitionState) NewObjectsIter(ts types.TS) (*objectsIter, error)
func (*PartitionState) NewPrimaryKeyDelIter ¶ added in v1.1.0
func (p *PartitionState) NewPrimaryKeyDelIter( ts types.TS, spec PrimaryKeyMatchSpec, bid types.Blockid, ) *primaryKeyDelIter
func (*PartitionState) NewPrimaryKeyIter ¶
func (p *PartitionState) NewPrimaryKeyIter( ts types.TS, spec PrimaryKeyMatchSpec, ) *primaryKeyIter
func (*PartitionState) NewRowsIter ¶
func (*PartitionState) PrimaryKeyMayBeModified ¶
type PrimaryIndexEntry ¶
type PrimaryIndexEntry struct { Bytes []byte RowEntryID int64 // fields for validating BlockID types.Blockid RowID types.Rowid Time types.TS }
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.