checksum

package
v1.1.0-beta.0...-56c07d0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FastChecksum

func FastChecksum(
	ctx context.Context,
	backupMeta *backuppb.BackupMeta,
	storage storage.ExternalStorage,
	cipher *backuppb.CipherInfo,
) error

FastChecksum checks whether the "local" checksum matches the checksum from TiKV.

Types

type Executor

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

Executor is a checksum executor.

func (*Executor) Each

func (exec *Executor) Each(f func(*kv.Request) error) error

Each executes the function to each requests in the executor.

func (*Executor) Execute

func (exec *Executor) Execute(
	ctx context.Context,
	client kv.Client,
	updateFn func(),
) (*tipb.ChecksumResponse, error)

Execute executes a checksum executor.

func (*Executor) Len

func (exec *Executor) Len() int

Len returns the total number of checksum requests.

func (*Executor) RawRequests

func (exec *Executor) RawRequests() ([]*tipb.ChecksumRequest, error)

RawRequests extracts the raw requests associated with this executor. This is mainly used for debugging only.

type ExecutorBuilder

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

ExecutorBuilder is used to build a "kv.Request".

func NewExecutorBuilder

func NewExecutorBuilder(table *model.TableInfo, ts uint64) *ExecutorBuilder

NewExecutorBuilder returns a new executor builder.

func (*ExecutorBuilder) Build

func (builder *ExecutorBuilder) Build() (*Executor, error)

Build builds a checksum executor.

func (*ExecutorBuilder) SetBackoffWeight

func (builder *ExecutorBuilder) SetBackoffWeight(backoffWeight int) *ExecutorBuilder

SetBackoffWeight set the backoffWeight of the checksum executing.

func (*ExecutorBuilder) SetConcurrency

func (builder *ExecutorBuilder) SetConcurrency(conc uint) *ExecutorBuilder

SetConcurrency set the concurrency of the checksum executing.

func (*ExecutorBuilder) SetExplicitRequestSourceType

func (builder *ExecutorBuilder) SetExplicitRequestSourceType(name string) *ExecutorBuilder

func (*ExecutorBuilder) SetNewKeyspace

func (builder *ExecutorBuilder) SetNewKeyspace(keyspace []byte) *ExecutorBuilder

func (*ExecutorBuilder) SetOldKeyspace

func (builder *ExecutorBuilder) SetOldKeyspace(keyspace []byte) *ExecutorBuilder

func (*ExecutorBuilder) SetOldTable

func (builder *ExecutorBuilder) SetOldTable(oldTable *metautil.Table) *ExecutorBuilder

SetOldTable set a old table info to the builder.

func (*ExecutorBuilder) SetResourceGroupName

func (builder *ExecutorBuilder) SetResourceGroupName(name string) *ExecutorBuilder

Jump to

Keyboard shortcuts

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