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 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 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 WalStats
- type WriteReq
- type WriteResp
Constants ¶
View Source
const ( GCState_Active int32 = iota GCState_Noop GCState_Scheduled GCState_ScheduledDone )
View Source
const ( WALDir = "wal" CATALOGDir = "catalog" )
View Source
const ( OpPreCommit = uint32(apipb.OpCode_OpPreCommit) OpGetLogTail = uint32(apipb.OpCode_OpGetLogTail) )
View Source
const (
LockName string = "TAE"
)
Variables ¶
View Source
var ( ErrTaskDuplicated = moerr.NewInternalError("tae task: duplicated task found") ErrTaskNotFound = moerr.NewInternalError("tae task: task not found") )
View Source
var (
ErrClosed = moerr.NewInternalError("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 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.LogtailMgr
Wal wal.Driver
Scheduler tasks.TaskScheduler
BGScanner wb.IHeartbeater
BGCheckpointRunner checkpoint.Runner
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 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 |
WriteReq |
apipb.SyncLogTailReq
}
type Response ¶ added in v0.6.0
type Response interface {
CreateDatabaseResp |
DropDatabaseResp |
CreateRelationResp |
DropOrTruncateRelationResp
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 WalStats ¶
func CollectWalStats ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.