ingestrec

package
v1.1.0-beta.0...-e641d2c Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IngestIndexInfo

type IngestIndexInfo struct {
	SchemaName pmodel.CIStr
	TableName  pmodel.CIStr
	ColumnList string
	ColumnArgs []any
	IsPrimary  bool
	IndexInfo  *model.IndexInfo
	Updated    bool
}

IngestIndexInfo records the information used to generate index drop/re-add SQL.

type IngestRecorder

type IngestRecorder struct {
	// contains filtered or unexported fields
}

IngestRecorder records the indexes information that use ingest mode to construct kvs. Currently log backup cannot backed up these ingest kvs. So need to re-construct them.

func New

func New() *IngestRecorder

Return an empty IngestRecorder

func (*IngestRecorder) Iterate

func (i *IngestRecorder) Iterate(f func(tableID int64, indexID int64, info *IngestIndexInfo) error) error

Iterate iterates all the ingest index.

func (*IngestRecorder) RewriteTableID

func (i *IngestRecorder) RewriteTableID(rewriteFunc func(tableID int64) (int64, bool, error)) error

RewriteTableID rewrites the table id of the items in the IngestRecorder

func (*IngestRecorder) TryAddJob

func (i *IngestRecorder) TryAddJob(job *model.Job, isSubJob bool) error

TryAddJob firstly filters the ingest index add operation job, and records it into IngestRecorder.

func (*IngestRecorder) UpdateIndexInfo

func (i *IngestRecorder) UpdateIndexInfo(infoSchema infoschema.InfoSchema) error

UpdateIndexInfo uses the newest schemas to update the ingest index's information

Jump to

Keyboard shortcuts

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