ingestrec

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

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0, Apache-2.0 Imports: 5 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 model.CIStr
	TableName  model.CIStr
	ColumnList string
	ColumnArgs []interface{}
	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) AddJob

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

AddJob firstly filters the ingest index add operation job, and records it into 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) UpdateIndexInfo

func (i *IngestRecorder) UpdateIndexInfo(dbInfos []*model.DBInfo)

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