Documentation ¶
Index ¶
- Constants
- Variables
- func AppendDataToTable(ctx context.Context, rel handle.Relation, bat *batch.Batch) (err error)
- func AttrFromColDef(col *catalog.ColDef) (attrs *engine.Attribute, err error)
- func CreateRelation(_ context.Context, dbH handle.Database, name string, id uint64, ...) (err error)
- func DefsToSchema(name string, defs []engine.TableDef) (schema *catalog.Schema, err error)
- func GetHideKeysOfTable(rel handle.Relation) ([]*engine.Attribute, error)
- func RunFactory[T InspectCmd](t T) func(cmd *cobra.Command, args []string)
- func RunInspect(ctx context.Context, inspectCtx *inspectContext)
- func SchemaToDefs(schema *catalog.Schema) (defs []engine.TableDef, err error)
- func TableDefs(rel handle.Relation) ([]engine.TableDef, error)
- func TableNamesOfDB(db handle.Database) ([]string, error)
- type Handle
- func (h *Handle) CacheTxnRequest(ctx context.Context, meta txn.TxnMeta, req any) (err error)
- func (h *Handle) GCCache(now time.Time) error
- func (h *Handle) GetDB() *db.DB
- func (h *Handle) HandleAddFaultPoint(ctx context.Context, meta txn.TxnMeta, req *db.FaultPoint, ...) (func(), error)
- func (h *Handle) HandleAlterTable(ctx context.Context, txn txnif.AsyncTxn, req *api.AlterTableReq) (err error)
- func (h *Handle) HandleBackup(ctx context.Context, meta txn.TxnMeta, req *db.Checkpoint, ...) (cb func(), err error)
- func (h *Handle) HandleClose(ctx context.Context) (err error)
- func (h *Handle) HandleCommit(ctx context.Context, meta txn.TxnMeta) (cts timestamp.Timestamp, err error)
- func (h *Handle) HandleCommitMerge(ctx context.Context, meta txn.TxnMeta, req *api.MergeCommitEntry, ...) (cb func(), err error)
- func (h *Handle) HandleCommitting(ctx context.Context, meta txn.TxnMeta) (err error)
- func (h *Handle) HandleCreateDatabase(ctx context.Context, txn txnif.AsyncTxn, req pkgcatalog.CreateDatabase) (err error)
- func (h *Handle) HandleCreateRelation(ctx context.Context, txn txnif.AsyncTxn, req pkgcatalog.CreateTable) (err error)
- func (h *Handle) HandleDestroy(ctx context.Context) (err error)
- func (h *Handle) HandleDisableCheckpoint(ctx context.Context, meta txn.TxnMeta, req *db.Checkpoint, ...) (cb func(), err error)
- func (h *Handle) HandleDiskCleaner(ctx context.Context, meta txn.TxnMeta, req *db.DiskCleaner, ...) (cb func(), err error)
- func (h *Handle) HandleDropDatabase(ctx context.Context, txn txnif.AsyncTxn, req pkgcatalog.DropDatabase) (err error)
- func (h *Handle) HandleDropOrTruncateRelation(ctx context.Context, txn txnif.AsyncTxn, req pkgcatalog.DropOrTruncateTable) (err error)
- func (h *Handle) HandleFlushTable(ctx context.Context, meta txn.TxnMeta, req *db.FlushTable, ...) (cb func(), err error)
- func (h *Handle) HandleForceCheckpoint(ctx context.Context, meta txn.TxnMeta, req *db.Checkpoint, ...) (cb func(), err error)
- func (h *Handle) HandleForceGlobalCheckpoint(ctx context.Context, meta txn.TxnMeta, req *db.Checkpoint, ...) (cb func(), err error)
- func (h *Handle) HandleGetLogTail(ctx context.Context, meta txn.TxnMeta, req *api.SyncLogTailReq, ...) (closeCB func(), err error)
- func (h *Handle) HandleInspectTN(ctx context.Context, meta txn.TxnMeta, req *db.InspectTN, resp *db.InspectResp) (cb func(), err error)
- func (h *Handle) HandleInterceptCommit(ctx context.Context, meta txn.TxnMeta, req *db.InterceptCommit, ...) (cb func(), err error)
- func (h *Handle) HandlePreCommitWrite(ctx context.Context, meta txn.TxnMeta, req *api.PrecommitWriteCmd, ...) (err error)
- func (h *Handle) HandlePrepare(ctx context.Context, meta txn.TxnMeta) (pts timestamp.Timestamp, err error)
- func (h *Handle) HandleRollback(ctx context.Context, meta txn.TxnMeta) (err error)
- func (h *Handle) HandleStartRecovery(ctx context.Context, ch chan txn.TxnMeta)
- func (h *Handle) HandleStorageUsage(ctx context.Context, meta txn.TxnMeta, req *db.StorageUsageReq, ...) (func(), error)
- func (h *Handle) HandleTraceSpan(ctx context.Context, meta txn.TxnMeta, req *db.TraceSpan, ...) (func(), error)
- func (h *Handle) HandleWrite(ctx context.Context, txn txnif.AsyncTxn, req *db.WriteReq) (err error)
- func (h *Handle) IsInterceptTable(name string) bool
- func (h *Handle) TryPrefechTxn(ctx context.Context, meta txn.TxnMeta) error
- func (h *Handle) UpdateInterceptMatchRegexp(name string)
- type InspectCmd
- type PolicyStatus
- type RenameColArg
Constants ¶
View Source
const ( MAX_ALLOWED_TXN_LATENCY = time.Millisecond * 300 MAX_TXN_COMMIT_LATENCY = time.Minute * 2 )
View Source
const AllowPruneDuration = 24 * time.Hour
Variables ¶
View Source
var TaskCache = &objsPruneTask{ memos: make(map[int]pruneTask), }
Functions ¶
func AppendDataToTable ¶ added in v0.8.0
func AttrFromColDef ¶ added in v0.8.0
func CreateRelation ¶ added in v0.8.0
func DefsToSchema ¶ added in v0.8.0
func GetHideKeysOfTable ¶ added in v0.8.0
func RunFactory ¶ added in v1.0.0
func RunFactory[T InspectCmd](t T) func(cmd *cobra.Command, args []string)
func RunInspect ¶ added in v0.7.0
func SchemaToDefs ¶ added in v0.8.0
Types ¶
type Handle ¶
func NewTAEHandle ¶
func (*Handle) CacheTxnRequest ¶
func (*Handle) GCCache ¶ added in v0.8.0
TODO: vast items within h.mu.txnCtxs would incur performance penality.
func (*Handle) HandleAddFaultPoint ¶ added in v1.0.0
func (h *Handle) HandleAddFaultPoint( ctx context.Context, meta txn.TxnMeta, req *db.FaultPoint, resp *api.SyncLogTailResp) (func(), error)
func (*Handle) HandleAlterTable ¶ added in v0.8.0
func (*Handle) HandleBackup ¶ added in v1.0.0
func (h *Handle) HandleBackup( ctx context.Context, meta txn.TxnMeta, req *db.Checkpoint, resp *api.SyncLogTailResp) (cb func(), err error)
func (*Handle) HandleCommit ¶
func (h *Handle) HandleCommit( ctx context.Context, meta txn.TxnMeta) (cts timestamp.Timestamp, err error)
HandlePreCommitWrite impls TxnStorage:Commit
func (*Handle) HandleCommitMerge ¶ added in v1.2.0
func (h *Handle) HandleCommitMerge( ctx context.Context, meta txn.TxnMeta, req *api.MergeCommitEntry, resp *db.InspectResp) (cb func(), err error)
func (*Handle) HandleCommitting ¶
func (*Handle) HandleCreateDatabase ¶
func (h *Handle) HandleCreateDatabase( ctx context.Context, txn txnif.AsyncTxn, req pkgcatalog.CreateDatabase) (err error)
func (*Handle) HandleCreateRelation ¶
func (h *Handle) HandleCreateRelation( ctx context.Context, txn txnif.AsyncTxn, req pkgcatalog.CreateTable) (err error)
func (*Handle) HandleDisableCheckpoint ¶ added in v1.2.1
func (h *Handle) HandleDisableCheckpoint( ctx context.Context, meta txn.TxnMeta, req *db.Checkpoint, resp *api.SyncLogTailResp) (cb func(), err error)
func (*Handle) HandleDiskCleaner ¶ added in v1.2.1
func (h *Handle) HandleDiskCleaner( ctx context.Context, meta txn.TxnMeta, req *db.DiskCleaner, resp *api.SyncLogTailResp) (cb func(), err error)
func (*Handle) HandleDropDatabase ¶
func (h *Handle) HandleDropDatabase( ctx context.Context, txn txnif.AsyncTxn, req pkgcatalog.DropDatabase) (err error)
func (*Handle) HandleDropOrTruncateRelation ¶
func (h *Handle) HandleDropOrTruncateRelation( ctx context.Context, txn txnif.AsyncTxn, req pkgcatalog.DropOrTruncateTable) (err error)
func (*Handle) HandleFlushTable ¶
func (h *Handle) HandleFlushTable( ctx context.Context, meta txn.TxnMeta, req *db.FlushTable, resp *api.SyncLogTailResp) (cb func(), err error)
func (*Handle) HandleForceCheckpoint ¶ added in v0.7.0
func (h *Handle) HandleForceCheckpoint( ctx context.Context, meta txn.TxnMeta, req *db.Checkpoint, resp *api.SyncLogTailResp) (cb func(), err error)
func (*Handle) HandleForceGlobalCheckpoint ¶ added in v1.1.2
func (h *Handle) HandleForceGlobalCheckpoint( ctx context.Context, meta txn.TxnMeta, req *db.Checkpoint, resp *api.SyncLogTailResp) (cb func(), err error)
func (*Handle) HandleGetLogTail ¶
func (h *Handle) HandleGetLogTail( ctx context.Context, meta txn.TxnMeta, req *api.SyncLogTailReq, resp *api.SyncLogTailResp) (closeCB func(), err error)
HandleGetLogTail impls TxnStorage:Read
func (*Handle) HandleInspectTN ¶ added in v1.0.0
func (*Handle) HandleInterceptCommit ¶ added in v1.2.0
func (h *Handle) HandleInterceptCommit( ctx context.Context, meta txn.TxnMeta, req *db.InterceptCommit, resp *api.SyncLogTailResp) (cb func(), err error)
func (*Handle) HandlePreCommitWrite ¶
func (h *Handle) HandlePreCommitWrite( ctx context.Context, meta txn.TxnMeta, req *api.PrecommitWriteCmd, _ *api.TNStringResponse) (err error)
HandlePreCommitWrite impls TxnStorage:Write
func (*Handle) HandlePrepare ¶
func (*Handle) HandleRollback ¶
func (*Handle) HandleStartRecovery ¶
func (*Handle) HandleStorageUsage ¶ added in v1.0.1
func (h *Handle) HandleStorageUsage(ctx context.Context, meta txn.TxnMeta, req *db.StorageUsageReq, resp *db.StorageUsageResp_V2) (func(), error)
func (*Handle) HandleTraceSpan ¶ added in v1.0.0
func (*Handle) HandleWrite ¶
func (h *Handle) HandleWrite( ctx context.Context, txn txnif.AsyncTxn, req *db.WriteReq) (err error)
HandleWrite Handle DML commands
func (*Handle) IsInterceptTable ¶ added in v1.2.0
func (*Handle) TryPrefechTxn ¶ added in v1.2.1
TryPrefechTxn only prefecth data written by CN, do not change the state machine of TxnEngine.
func (*Handle) UpdateInterceptMatchRegexp ¶ added in v1.2.0
type InspectCmd ¶ added in v1.0.0
type PolicyStatus ¶ added in v1.2.0
type PolicyStatus struct {
// contains filtered or unexported fields
}
func (*PolicyStatus) FromCommand ¶ added in v1.2.0
func (c *PolicyStatus) FromCommand(cmd *cobra.Command) (err error)
func (*PolicyStatus) PrepareCommand ¶ added in v1.2.0
func (c *PolicyStatus) PrepareCommand() *cobra.Command
func (*PolicyStatus) Run ¶ added in v1.2.0
func (c *PolicyStatus) Run() (err error)
func (*PolicyStatus) String ¶ added in v1.2.0
func (c *PolicyStatus) String() string
type RenameColArg ¶ added in v1.2.0
type RenameColArg struct {
// contains filtered or unexported fields
}
func (*RenameColArg) FromCommand ¶ added in v1.2.0
func (c *RenameColArg) FromCommand(cmd *cobra.Command) (err error)
func (*RenameColArg) PrepareCommand ¶ added in v1.2.0
func (c *RenameColArg) PrepareCommand() *cobra.Command
func (*RenameColArg) Run ¶ added in v1.2.0
func (c *RenameColArg) Run() (err error)
func (*RenameColArg) String ¶ added in v1.2.0
func (c *RenameColArg) String() string
Click to show internal directories.
Click to hide internal directories.