restore

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

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertUserDBsEmpty

func AssertUserDBsEmpty(dom *domain.Domain) error

AssertUserDBsEmpty check whether user dbs exist in the cluster

func GetTS

func GetTS(ctx context.Context, pdClient pd.Client) (uint64, error)

GetTS gets a new timestamp from PD.

func GetTSWithRetry

func GetTSWithRetry(ctx context.Context, pdClient pd.Client) (uint64, error)

GetTSWithRetry gets a new timestamp with retry from PD.

func GetTableSchema

func GetTableSchema(
	dom *domain.Domain,
	dbName pmodel.CIStr,
	tableName pmodel.CIStr,
) (*model.TableInfo, error)

GetTableSchema returns the schema of a table from TiDB.

func RestorePostWork

func RestorePostWork(
	ctx context.Context,
	switcher *ImportModeSwitcher,
	restoreSchedulers pdutil.UndoFunc,
	isOnline bool,
)

RestorePostWork executes some post work after restore. TODO: aggregate all lifetime manage methods into batcher's context manager field.

func RestorePreWork

func RestorePreWork(
	ctx context.Context,
	mgr *conn.Mgr,
	switcher *ImportModeSwitcher,
	isOnline bool,
	switchToImport bool,
) (pdutil.UndoFunc, *pdutil.ClusterConfig, error)

RestorePreWork executes some prepare work before restore. TODO make this function returns a restore post work.

func TransferBoolToValue

func TransferBoolToValue(enable bool) string

Types

type Granularity

type Granularity string

deprecated parameter

const (
	FineGrained   Granularity = "fine-grained"
	CoarseGrained Granularity = "coarse-grained"
)

type ImportModeSwitcher

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

func NewImportModeSwitcher

func NewImportModeSwitcher(
	pdClient pd.Client,
	switchModeInterval time.Duration,
	tlsConf *tls.Config,
) *ImportModeSwitcher

type UniqueTableName

type UniqueTableName struct {
	DB    string
	Table string
}

Jump to

Keyboard shortcuts

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