tiflashrec

package
v1.1.0-beta.0...-d13e52e 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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TiFlashRecorder

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

TiFlashRecorder records the information of TiFlash replicas during restoring. Because the limit of the current implementation, we add serval hooks to observe the information we need:

  • Before full restore create tables: We record the tiflash replica information and remove the replica info. Because during PiTR restore, the transaction model would be broken, which breaks TiFlash too. We must make sure they won't be replicated to TiFlash during the whole PiTR procedure.
  • After full restore created tables, generating rewrite rules: We perform the rewrite rule over our records. We trace table via table ID instead of table name so we can handle `RENAME` DDLs.
  • When doing PiTR restore, after rewriting table info in meta key: We update the replica information

func New

func New() *TiFlashRecorder

func (*TiFlashRecorder) AddTable

func (r *TiFlashRecorder) AddTable(tableID int64, replica model.TiFlashReplicaInfo)

func (*TiFlashRecorder) DelTable

func (r *TiFlashRecorder) DelTable(tableID int64)

func (*TiFlashRecorder) GenerateAlterTableDDLs

func (r *TiFlashRecorder) GenerateAlterTableDDLs(info infoschema.InfoSchema) []string

func (*TiFlashRecorder) GenerateResetAlterTableDDLs

func (r *TiFlashRecorder) GenerateResetAlterTableDDLs(info infoschema.InfoSchema) []string

func (*TiFlashRecorder) GetItems

func (r *TiFlashRecorder) GetItems() map[int64]model.TiFlashReplicaInfo

func (*TiFlashRecorder) Iterate

func (r *TiFlashRecorder) Iterate(f func(tableID int64, replica model.TiFlashReplicaInfo))

func (*TiFlashRecorder) Load

func (r *TiFlashRecorder) Load(items map[int64]model.TiFlashReplicaInfo)

func (*TiFlashRecorder) Rewrite

func (r *TiFlashRecorder) Rewrite(oldID int64, newID int64)

Jump to

Keyboard shortcuts

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