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 CatalogStats
- type DB
- func (db *DB) Close() error
- func (db *DB) CollectStats() *Stats
- func (db *DB) CommitTxn(txn txnif.AsyncTxn) (err error)
- func (db *DB) GetTxn(id uint64) (txn txnif.AsyncTxn, err error)
- func (db *DB) GetTxnByCtx(ctx []byte) (txn txnif.AsyncTxn, err error)
- func (db *DB) PrintStats()
- func (db *DB) Replay(dataFactory *tables.DataFactory)
- func (db *DB) RollbackTxn(txn txnif.AsyncTxn) error
- func (db *DB) StartTxn(info []byte) (txnif.AsyncTxn, error)
- type DBScanner
- type ErrHandler
- type GCType
- 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 Replayer
- func (replayer *Replayer) GetMaxTS() uint64
- func (replayer *Replayer) OnReplayCmd(txncmd txnif.TxnCmd, idxCtx *wal.Index)
- func (replayer *Replayer) OnReplayEntry(group uint32, commitId uint64, payload []byte, typ uint16, info any)
- func (replayer *Replayer) OnStaleIndex(idx *wal.Index)
- func (replayer *Replayer) OnTimeStamp(ts uint64)
- func (replayer *Replayer) PostReplayWal()
- func (replayer *Replayer) PreReplayWal()
- func (replayer *Replayer) Replay()
- type ScannerOp
- type ScheduledTxnTask
- type Stats
- type TxnStats
- type WalStats
Constants ¶
View Source
const ( WALDir = "wal" CATALOGDir = "catalog" )
View Source
const DefaultReplayCacheSize = 2 * common.M
View Source
const (
LockName string = "TAE"
)
Variables ¶
View Source
var ( ErrTaskDuplicated = errors.New("tae task: duplicated task found") ErrTaskNotFound = errors.New("tae task: task not found") )
View Source
var (
ErrClosed = errors.New("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 CatalogStats ¶
func CollectCatalogStats ¶
func CollectCatalogStats(c *catalog.Catalog) *CatalogStats
type DB ¶
type DB struct { Dir string Opts *options.Options Catalog *catalog.Catalog IndexBufMgr base.INodeManager MTBufMgr base.INodeManager TxnBufMgr base.INodeManager TxnMgr *txnbase.TxnManager Wal wal.Driver CKPDriver checkpoint.Driver Scheduler tasks.TaskScheduler TimedScanner wb.IHeartbeater FileFactory file.SegmentFactory DBLocker io.Closer Closed *atomic.Value }
func (*DB) CollectStats ¶
func (*DB) PrintStats ¶
func (db *DB) PrintStats()
func (*DB) Replay ¶
func (db *DB) Replay(dataFactory *tables.DataFactory)
type ErrHandler ¶
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 Replayer ¶
type Replayer struct { DataFactory *tables.DataFactory // contains filtered or unexported fields }
func (*Replayer) OnReplayCmd ¶
func (*Replayer) OnReplayEntry ¶
func (*Replayer) OnStaleIndex ¶
func (*Replayer) OnTimeStamp ¶
func (*Replayer) PostReplayWal ¶
func (replayer *Replayer) PostReplayWal()
func (*Replayer) PreReplayWal ¶
func (replayer *Replayer) PreReplayWal()
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 Stats ¶
type Stats struct { CatalogStats *CatalogStats TxnStats *TxnStats WalStats *WalStats // contains filtered or unexported fields }
type TxnStats ¶
func CollectTxnStats ¶
func CollectTxnStats(mgr *txnbase.TxnManager) *TxnStats
Source Files ¶
Click to show internal directories.
Click to hide internal directories.