Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAppendableBlockNotFound = moerr.NewAppendableBlockNotFoundNoCtx() ErrAppendableSegmentNotFound = moerr.NewAppendableSegmentNotFoundNoCtx() )
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block interface { CheckpointUnit BlockReplayer DeletesInfo() string GetRowsOnReplay() uint64 GetID() *common.ID IsAppendable() bool PrepareCompact() bool Rows() int GetColumnDataById(ctx context.Context, txn txnif.AsyncTxn, readSchema any, colIdx int) (*containers.ColumnView, error) GetColumnDataByIds(ctx context.Context, txn txnif.AsyncTxn, readSchema any, colIdxes []int) (*containers.BlockView, error) Prefetch(idxes []uint16) error GetMeta() any MakeAppender() (BlockAppender, error) RangeDelete(txn txnif.AsyncTxn, start, end uint32, dt handle.DeleteType) (txnif.DeleteNode, error) GetTotalChanges() int CollectChangesInRange(ctx context.Context, startTs, endTs types.TS) (*containers.BlockView, error) // check wether any delete intents with prepared ts within [from, to] HasDeleteIntentsPreparedIn(from, to types.TS) bool // check if all rows are committed before ts // NOTE: here we assume that the block is visible to the ts // if the block is an appendable block: // 1. if the block is not frozen, return false // 2. if the block is frozen and in-memory, check with the max ts committed // 3. if the block is persisted, return false // if the block is not an appendable block: // only check with the created ts CoarseCheckAllRowsCommittedBefore(ts types.TS) bool BatchDedup(ctx context.Context, txn txnif.AsyncTxn, pks containers.Vector, pksZM index.ZM, rowmask *roaring.Bitmap, precommit bool, bf objectio.BloomFilter) error GetByFilter(ctx context.Context, txn txnif.AsyncTxn, filter *handle.Filter) (uint32, error) GetValue(ctx context.Context, txn txnif.AsyncTxn, readSchema any, row, col int) (any, bool, error) Foreach(ctx context.Context, colIdx int, op func(v any, isNull bool, row int) error, sels *nulls.Bitmap) error PPString(level common.PPLevel, depth int, prefix string) string Init() error TryUpgrade() error GCInMemeoryDeletesByTS(types.TS) CollectAppendInRange(start, end types.TS, withAborted bool) (*containers.BatchWithVersion, error) CollectDeleteInRange(ctx context.Context, start, end types.TS, withAborted bool) (*containers.Batch, error) // GetAppendNodeByRow(row uint32) (an txnif.AppendNode) // GetDeleteNodeByRow(row uint32) (an txnif.DeleteNode) GetFs() *objectio.ObjectFS FreezeAppend() Close() }
type BlockAppender ¶
type BlockAppender interface { GetID() *common.ID GetMeta() any IsSameColumns(otherSchema any) bool PrepareAppend(rows uint32, txn txnif.AsyncTxn) ( node txnif.AppendNode, created bool, n uint32, err error) ApplyAppend(bat *containers.Batch, txn txnif.AsyncTxn, ) (int, error) IsAppendable() bool ReplayAppend(bat *containers.Batch, txn txnif.AsyncTxn) (int, error) Close() }
type BlockReplayer ¶
type BlockReplayer interface { OnReplayDelete(node txnif.DeleteNode) (err error) OnReplayAppend(node txnif.AppendNode) (err error) OnReplayAppendPayload(bat *containers.Batch) (err error) }
type CheckpointUnit ¶
type Segment ¶
type Segment interface { CheckpointUnit GetID() uint64 BatchDedup(txn txnif.AsyncTxn, pks containers.Vector) error Destroy() error }
type Table ¶
type Table interface { GetHandle() TableHandle ApplyHandle(TableHandle) }
type TableHandle ¶
type TableHandle interface { GetAppender() (BlockAppender, error) SetAppender(*common.ID) BlockAppender }
Click to show internal directories.
Click to hide internal directories.