merge

package
v1.2.3-hotfix-20241101 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

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

type ActiveCNObjMap struct {
	sync.Mutex
	// contains filtered or unexported fields
}
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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL