Documentation ¶
Index ¶
- Variables
- func CleanUpUselessFiles(entry *api.MergeCommitEntry, fs fileservice.FileService)
- func NewUpdatePolicyReq(c *BasicPolicyConfig) *api.AlterTableReq
- type ActiveCNObjMap
- func (e *ActiveCNObjMap) AddActiveCNObj(entries []*catalog.ObjectEntry)
- func (e *ActiveCNObjMap) CheckOverlapOnCNActive(entries []*catalog.ObjectEntry) bool
- func (e *ActiveCNObjMap) Prune(id uint64, ago time.Duration)
- func (e *ActiveCNObjMap) RemoveActiveCNObj(ids []objectio.ObjectId)
- func (e *ActiveCNObjMap) String() string
- type BasicPolicyConfig
- type CNMergeScheduler
- type MergeExecutor
- func (e *MergeExecutor) AddActiveTask(taskId uint64, blkn, esize int)
- func (e *MergeExecutor) CPUPercent() int64
- func (e *MergeExecutor) ExecuteFor(entry *catalog.TableEntry, mobjs []*catalog.ObjectEntry, kind TaskHostKind)
- func (e *MergeExecutor) MemAvailBytes() int
- func (e *MergeExecutor) OnExecDone(v any)
- func (e *MergeExecutor) PrintStats()
- func (e *MergeExecutor) RefreshMemInfo()
- func (e *MergeExecutor) TransferPageSizeLimit() uint64
- type Policy
- type TaskHostKind
Constants ¶
This section is empty.
Variables ¶
View Source
var DisableDeltaLocMerge atomic.Bool
View Source
var StopMerge atomic.Bool
Functions ¶
func CleanUpUselessFiles ¶ added in v1.2.0
func CleanUpUselessFiles(entry *api.MergeCommitEntry, fs fileservice.FileService)
func NewUpdatePolicyReq ¶ added in v1.2.0
func NewUpdatePolicyReq(c *BasicPolicyConfig) *api.AlterTableReq
Types ¶
type ActiveCNObjMap ¶ added in v1.2.0
var ActiveCNObj ActiveCNObjMap = ActiveCNObjMap{ // contains filtered or unexported fields }
func (*ActiveCNObjMap) AddActiveCNObj ¶ added in v1.2.0
func (e *ActiveCNObjMap) AddActiveCNObj(entries []*catalog.ObjectEntry)
func (*ActiveCNObjMap) CheckOverlapOnCNActive ¶ added in v1.2.0
func (e *ActiveCNObjMap) CheckOverlapOnCNActive(entries []*catalog.ObjectEntry) bool
func (*ActiveCNObjMap) Prune ¶ added in v1.2.0
func (e *ActiveCNObjMap) Prune(id uint64, ago time.Duration)
func (*ActiveCNObjMap) RemoveActiveCNObj ¶ added in v1.2.0
func (e *ActiveCNObjMap) RemoveActiveCNObj(ids []objectio.ObjectId)
func (*ActiveCNObjMap) String ¶ added in v1.2.0
func (e *ActiveCNObjMap) String() string
type BasicPolicyConfig ¶
type BasicPolicyConfig struct { MergeMaxOneRun int ObjectMinOsize uint32 MaxOsizeMergedObj uint32 MinCNMergeSize uint64 FromUser bool MergeHints []api.MergeHint // contains filtered or unexported fields }
func (*BasicPolicyConfig) String ¶
func (c *BasicPolicyConfig) String() string
type CNMergeScheduler ¶ added in v1.2.0
type CNMergeScheduler interface {
SendMergeTask(ctx context.Context, task *api.MergeTaskEntry) error
}
func NewTaskServiceGetter ¶ added in v1.2.0
func NewTaskServiceGetter(getter taskservice.Getter) CNMergeScheduler
type MergeExecutor ¶
type MergeExecutor struct {
// contains filtered or unexported fields
}
MergeExecutor consider resources to decide to merge or not.
func NewMergeExecutor ¶
func NewMergeExecutor(rt *dbutils.Runtime, sched CNMergeScheduler) *MergeExecutor
func (*MergeExecutor) AddActiveTask ¶
func (e *MergeExecutor) AddActiveTask(taskId uint64, blkn, esize int)
func (*MergeExecutor) CPUPercent ¶ added in v1.2.0
func (e *MergeExecutor) CPUPercent() int64
func (*MergeExecutor) ExecuteFor ¶
func (e *MergeExecutor) ExecuteFor(entry *catalog.TableEntry, mobjs []*catalog.ObjectEntry, kind TaskHostKind)
func (*MergeExecutor) MemAvailBytes ¶ added in v1.0.1
func (e *MergeExecutor) MemAvailBytes() int
func (*MergeExecutor) OnExecDone ¶
func (e *MergeExecutor) OnExecDone(v any)
func (*MergeExecutor) PrintStats ¶
func (e *MergeExecutor) PrintStats()
func (*MergeExecutor) RefreshMemInfo ¶
func (e *MergeExecutor) RefreshMemInfo()
func (*MergeExecutor) TransferPageSizeLimit ¶ added in v1.2.1
func (e *MergeExecutor) TransferPageSizeLimit() uint64
type Policy ¶
type Policy interface { OnObject(obj *catalog.ObjectEntry, force bool) Revise(cpu, mem int64) ([]*catalog.ObjectEntry, TaskHostKind) ResetForTable(*catalog.TableEntry) SetConfig(*catalog.TableEntry, func() txnif.AsyncTxn, any) GetConfig(*catalog.TableEntry) any }
func NewBasicPolicy ¶
func NewBasicPolicy() Policy
type TaskHostKind ¶ added in v1.2.0
type TaskHostKind int
const ( TaskHostCN TaskHostKind = iota TaskHostDN )
Click to show internal directories.
Click to hide internal directories.