Documentation ¶
Index ¶
- Constants
- Variables
- func MakeBlockScopes(entries ...*catalog.BlockEntry) (scopes []common.ID)
- func MakeDBScopes(entry *catalog.DBEntry) (scopes []common.ID)
- func MakeSegmentScopes(entries ...*catalog.SegmentEntry) (scopes []common.ID)
- func MakeTableScopes(entries ...*catalog.TableEntry) (scopes []common.ID)
- func NewDBScanner(db *DB, errHandler ErrHandler) *dbScanner
- func ScopeConflictCheck(oldScope, newScope *common.ID) (err error)
- type AccessInfo
- type CatalogResp
- type Checkpoint
- type CreateDatabaseReq
- type CreateDatabaseResp
- type CreateRelationReq
- type CreateRelationResp
- type DB
- func (db *DB) Close() error
- func (db *DB) CollectStats() *Stats
- func (db *DB) CommitTxn(txn txnif.AsyncTxn) (err error)
- func (db *DB) FlushTable(tenantID uint32, dbId, tableId uint64, ts types.TS) (err error)
- func (db *DB) GetOrCreateTxnWithMeta(info []byte, id []byte, ts types.TS) (txn txnif.AsyncTxn, err error)
- func (db *DB) GetTxn(id string) (txn txnif.AsyncTxn, err error)
- func (db *DB) GetTxnByCtx(txnOperator client.TxnOperator) (txn txnif.AsyncTxn, err error)
- func (db *DB) PrintStats()
- func (db *DB) Replay(dataFactory *tables.DataFactory, maxTs types.TS)
- func (db *DB) RollbackTxn(txn txnif.AsyncTxn) error
- func (db *DB) StartTxn(info []byte) (txnif.AsyncTxn, error)
- type DBScanner
- type DropDatabaseReq
- type DropDatabaseResp
- type DropOrTruncateRelationReq
- type DropOrTruncateRelationResp
- type EntryType
- type ErrHandler
- type FlushTable
- type InspectDN
- type InspectResp
- type LocationKey
- type MergeTaskBuilder
- type NoopErrHandler
- func (h *NoopErrHandler) OnBlockErr(entry *catalog.BlockEntry, err error) error
- func (h *NoopErrHandler) OnDatabaseErr(entry *catalog.DBEntry, err error) error
- func (h *NoopErrHandler) OnSegmentErr(entry *catalog.SegmentEntry, err error) error
- func (h *NoopErrHandler) OnTableErr(entry *catalog.TableEntry, err error) error
- type RelationType
- type Replayer
- func (replayer *Replayer) GetMaxTS() types.TS
- func (replayer *Replayer) OnReplayEntry(group uint32, lsn uint64, payload []byte, typ uint16, info any)
- func (replayer *Replayer) OnReplayTxn(cmd txnif.TxnCmd, walIdx *wal.Index, lsn uint64)
- func (replayer *Replayer) OnStaleIndex(idx *wal.Index)
- func (replayer *Replayer) OnTimeStamp(ts types.TS)
- func (replayer *Replayer) PreReplayWal()
- func (replayer *Replayer) Replay()
- type Request
- type Response
- type ScannerOp
- type ScheduledTxnTask
- type Stats
- type UpdateConstraintReq
- type UpdateConstraintResp
- type WalStats
- type WriteReq
- type WriteResp
Constants ¶
View Source
const ( WALDir = "wal" CATALOGDir = "catalog" )
View Source
const ( OpPreCommit = uint32(apipb.OpCode_OpPreCommit) OpGetLogTail = uint32(apipb.OpCode_OpGetLogTail) )
View Source
const ( InspectNormal = 0 InspectCata = 1 )
View Source
const (
LockName string = "TAE"
)
Variables ¶
View Source
var ( ErrTaskDuplicated = moerr.NewInternalErrorNoCtx("tae task: duplicated task found") ErrTaskNotFound = moerr.NewInternalErrorNoCtx("tae task: task not found") )
View Source
var (
ErrClosed = moerr.NewInternalErrorNoCtx("tae: closed")
)
Functions ¶
func MakeBlockScopes ¶
func MakeBlockScopes(entries ...*catalog.BlockEntry) (scopes []common.ID)
func MakeSegmentScopes ¶
func MakeSegmentScopes(entries ...*catalog.SegmentEntry) (scopes []common.ID)
func MakeTableScopes ¶
func MakeTableScopes(entries ...*catalog.TableEntry) (scopes []common.ID)
func NewDBScanner ¶
func NewDBScanner(db *DB, errHandler ErrHandler) *dbScanner
func ScopeConflictCheck ¶
Types ¶
type AccessInfo ¶ added in v0.6.0
type CatalogResp ¶ added in v0.7.0
type CatalogResp struct { Item string `json:"Item,omitempty"` Sub []*CatalogResp `json:"Sub,omitempty"` }
type Checkpoint ¶ added in v0.7.0
type CreateDatabaseReq ¶ added in v0.6.0
type CreateDatabaseReq struct { AccessInfo AccessInfo Name string CreateSql string //Global unique, allocated by CN . DatabaseId uint64 }
type CreateDatabaseResp ¶ added in v0.6.0
type CreateDatabaseResp struct {
ID uint64
}
type CreateRelationReq ¶ added in v0.6.0
type CreateRelationReq struct { AccessInfo AccessInfo DatabaseID uint64 DatabaseName string Name string RelationId uint64 Type RelationType Defs []engine.TableDef }
type CreateRelationResp ¶ added in v0.6.0
type CreateRelationResp struct {
ID uint64
}
type DB ¶
type DB struct { Dir string Opts *options.Options Catalog *catalog.Catalog MTBufMgr base.INodeManager TxnBufMgr base.INodeManager TxnMgr *txnbase.TxnManager TransferTable *model.HashPageTable LogtailMgr *logtail.Manager Wal wal.Driver Scheduler tasks.TaskScheduler GCManager *gc.Manager BGScanner wb.IHeartbeater BGCheckpointRunner checkpoint.Runner DiskCleaner *gc2.DiskCleaner Fs *objectio.ObjectFS DBLocker io.Closer Closed *atomic.Value }
func (*DB) CollectStats ¶
func (*DB) FlushTable ¶ added in v0.6.0
func (*DB) GetOrCreateTxnWithMeta ¶ added in v0.6.0
func (*DB) GetTxnByCtx ¶
func (*DB) PrintStats ¶
func (db *DB) PrintStats()
type DropDatabaseReq ¶ added in v0.6.0
type DropDatabaseResp ¶ added in v0.6.0
type DropDatabaseResp struct {
ID uint64
}
type DropOrTruncateRelationReq ¶ added in v0.6.0
type DropOrTruncateRelationResp ¶ added in v0.6.0
type DropOrTruncateRelationResp struct { }
type ErrHandler ¶
type FlushTable ¶ added in v0.6.0
type FlushTable struct { AccessInfo AccessInfo DatabaseID uint64 TableID uint64 }
type InspectDN ¶ added in v0.7.0
type InspectDN struct { AccessInfo AccessInfo Operation string }
type InspectResp ¶ added in v0.7.0
type InspectResp struct { Typ int `json:"-"` Message string `json:"msg"` Payload []byte `json:"-"` }
func (*InspectResp) GetResponse ¶ added in v0.7.0
func (r *InspectResp) GetResponse() any
type LocationKey ¶ added in v0.7.0
type LocationKey struct{}
type MergeTaskBuilder ¶ added in v0.7.0
type MergeTaskBuilder struct { *catalog.LoopProcessor // contains filtered or unexported fields }
func (*MergeTaskBuilder) PostExecute ¶ added in v0.7.0
func (s *MergeTaskBuilder) PostExecute() error
func (*MergeTaskBuilder) PreExecute ¶ added in v0.7.0
func (s *MergeTaskBuilder) PreExecute() error
type NoopErrHandler ¶
type NoopErrHandler struct{}
func (*NoopErrHandler) OnBlockErr ¶
func (h *NoopErrHandler) OnBlockErr(entry *catalog.BlockEntry, err error) error
func (*NoopErrHandler) OnDatabaseErr ¶
func (h *NoopErrHandler) OnDatabaseErr(entry *catalog.DBEntry, err error) error
func (*NoopErrHandler) OnSegmentErr ¶
func (h *NoopErrHandler) OnSegmentErr(entry *catalog.SegmentEntry, err error) error
func (*NoopErrHandler) OnTableErr ¶
func (h *NoopErrHandler) OnTableErr(entry *catalog.TableEntry, err error) error
type RelationType ¶ added in v0.6.0
type RelationType uint8
const ( RelationTable RelationType = iota + 1 RelationView )
type Replayer ¶
type Replayer struct { DataFactory *tables.DataFactory // contains filtered or unexported fields }
func (*Replayer) OnReplayEntry ¶
func (*Replayer) OnReplayTxn ¶ added in v0.6.0
func (*Replayer) OnStaleIndex ¶
func (*Replayer) OnTimeStamp ¶
func (*Replayer) PreReplayWal ¶
func (replayer *Replayer) PreReplayWal()
type Request ¶ added in v0.6.0
type Request interface { CreateDatabaseReq | DropDatabaseReq | CreateRelationReq | DropOrTruncateRelationReq | UpdateConstraintReq | WriteReq | apipb.SyncLogTailReq }
type Response ¶ added in v0.6.0
type Response interface { CreateDatabaseResp | DropDatabaseResp | CreateRelationResp | DropOrTruncateRelationResp | UpdateConstraintResp | WriteResp | apipb.SyncLogTailResp }
type ScheduledTxnTask ¶
func NewScheduledTxnTask ¶
func NewScheduledTxnTask(ctx *tasks.Context, db *DB, taskType tasks.TaskType, scopes []common.ID, factory tasks.TxnTaskFactory) (task *ScheduledTxnTask)
func (*ScheduledTxnTask) Execute ¶
func (task *ScheduledTxnTask) Execute() (err error)
func (*ScheduledTxnTask) Scope ¶
func (task *ScheduledTxnTask) Scope() *common.ID
func (*ScheduledTxnTask) Scopes ¶
func (task *ScheduledTxnTask) Scopes() []common.ID
type UpdateConstraintReq ¶ added in v0.7.0
type UpdateConstraintResp ¶ added in v0.7.0
type UpdateConstraintResp struct{}
type WalStats ¶
func CollectWalStats ¶
type WriteReq ¶ added in v0.6.0
type WriteReq struct { Type EntryType DatabaseId uint64 TableID uint64 DatabaseName string TableName string Schema *catalog2.Schema Batch *batch.Batch //S3 object file name FileName string MetaLocs []string //for delete on S3 DeltaLocs []string //tasks for loading primary keys or deleted row ids Jobs []*tasks.Job //loaded sorted primary keys or deleted row ids. JobRes []*tasks.JobResult //load context cancel function Cancel context.CancelFunc }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.