Documentation ¶
Index ¶
- type TiFlashRecorder
- func (r *TiFlashRecorder) AddTable(tableID int64, replica model.TiFlashReplicaInfo)
- func (r *TiFlashRecorder) DelTable(tableID int64)
- func (r *TiFlashRecorder) GenerateAlterTableDDLs(info infoschema.InfoSchema) []string
- func (r *TiFlashRecorder) GenerateResetAlterTableDDLs(info infoschema.InfoSchema) []string
- func (r *TiFlashRecorder) GetItems() map[int64]model.TiFlashReplicaInfo
- func (r *TiFlashRecorder) Iterate(f func(tableID int64, replica model.TiFlashReplicaInfo))
- func (r *TiFlashRecorder) Load(items map[int64]model.TiFlashReplicaInfo)
- func (r *TiFlashRecorder) Rewrite(oldID int64, newID int64)
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)
Click to show internal directories.
Click to hide internal directories.