package
3.0.0-rc.3+incompatible
Repository: https://github.com/vitessio/vitess.git
Documentation: pkg.go.dev
# Packages
Package fakevtworkerclient contains a fake for the vtworkerclient interface.
Package grpcvtworkerclient contains the gRPC version of the vtworker client protocol.
Package grpcvtworkerserver contains the gRPC implementation of the server side
of the remote execution of vtworker commands.
Package vtworkerclient contains the generic client side of the remote vtworker protocol.
Package vtworkerclienttest contains the testsuite against which each RPC implementation of the vtworkerclient interface must be tested.
# Functions
AddCommand registers a command and makes it available.
CompareRows returns: -1 if left is smaller than right 0 if left and right are equal +1 if left is bigger than right It compares only up to and including the first "compareCount" columns of each row.
FindHealthyTablet returns a random healthy tabletType tablet.
FindWorkerTablet will: - find a tabletType instance in the keyspace / shard - mark it as worker - tag it with our worker process.
NewBlockWorker returns a new BlockWorker object.
NewDeletesQueryBuilder creates a new DeletesQueryBuilder.
NewInsertsQueryBuilder creates a new InsertsQueryBuilder.
NewInstance creates a new Instance.
NewLegacySplitCloneWorker returns a new LegacySplitCloneWorker object.
NewPanicWorker returns a new PanicWorker object.
NewPingWorker returns a new PingWorker object.
NewQueryResultReaderForTablet creates a new QueryResultReader for the provided tablet / sql query.
NewRestartableResultReader creates a new RestartableResultReader for the provided tablet and chunk.
NewResultMerger returns a new ResultMerger.
NewRowAggregator returns a RowAggregator.
NewRowDiffer returns a new RowDiffer.
NewRowDiffer2 returns a new RowDiffer2.
NewRowReader returns a RowReader based on the QueryResultReader.
NewRowRouter creates a RowRouter.
NewRowSplitter returns a new row splitter for the given shard distribution.
NewSplitDiffWorker returns a new SplitDiffWorker object.
NewStatusWorker returns a StatusWorker in state WorkerStateNotStarted.
NewTabletTracker returns a new TabletTracker.
NewUpdatesQueryBuilder creates a new UpdatesQueryBuilder.
NewVerticalSplitDiffWorker returns a new VerticalSplitDiffWorker object.
PrintAllCommands prints a help text for all registered commands to the given Logger.
RowsEqual returns the index of the first different column, or -1 if both rows are the same.
TableScan returns a QueryResultReader that gets all the rows from a table, ordered by Primary Key.
TableScanByKeyRange returns a QueryResultReader that gets all the rows from a table that match the supplied KeyRange, ordered by Primary Key.
# Constants
DiffEqual is returned when the rows left and right are equal.
DiffExtraneous is returned when the row exists on the right side, but not on the left side.
DiffMissing is returned when the row is missing on the right side.
DiffNotEqual is returned when the row on the left and right side are not equal.
ResultSizeRows specifies how many rows should be merged together per returned Result.
WorkerStateCleanUp is set when the worker reverses the initialization e.g.
WorkerStateCloneOffline is set when the worker copies the data in the offline phase.
WorkerStateCloneOnline is set when the worker copies the data in the online phase.
WorkerStateDebugRunning is set when an internal command (e.g.
WorkerStateDiff is set when the worker compares the data.
WorkerStateDiffWillFail is set when the worker is still comparing the data, but we have already found discrepancies.
WorkerStateDone is set when the worker successfully finished.
WorkerStateError is set when the worker failed.
WorkerStateFindTargets is set when the worker searches healthy RDONLY tablets.
WorkerStateInit is set when the worker does initialize its state.
WorkerStateNotStarted is the initial state.
WorkerStateSyncReplication is set when the worker ensures that source and destination tablets are at the same GTID during the diff.
# Variables
DiffFoundTypes has the list of DiffType values which represent that a difference was found.
DiffTypes has the list of available DiffType values, ordered by their value.
ErrStoppedRowReader is returned by RowReader.Next() when StopAfterCurrentResult() and it finished the current result.
# Structs
BaseQueryBuilder partially implements the QueryBuilder interface.
BlockWorker will block infinitely until its context is canceled.
Command contains the detail of a command which can be run in vtworker.
DeletesQueryBuilder implements the QueryBuilder interface for DELETE queries.
DiffReport has the stats for a diff job.
InsertsQueryBuilder implements the QueryBuilder interface for INSERT queries.
Instance encapsulate the execution state of vtworker.
LegacySplitCloneWorker will clone the data within a keyspace from a source set of shards to a destination set of shards.
Pair represents a tablet (Key) and its usage (Value).
PanicWorker will run panic() when executed.
PingWorker will log a message with level CONSOLE.
QueryResultReader will stream rows towards the output channel.
RestartableResultReader will stream all rows within a chunk.
ResultMerger returns a sorted stream of multiple ResultReader input streams.
RowAggregator aggregates SQL reconciliation statements into one statement.
RowDiffer will consume rows on both sides, and compare them.
RowDiffer2 will compare and reconcile two sides.
RowReader returns individual rows from a ResultReader.
RowRouter allows to find out which shard's key range contains a given keyspace ID.
RowSplitter is a helper class to split rows into multiple subsets targeted to different shards.
SplitCloneWorker will clone the data within a keyspace from a source set of shards to a destination set of shards.
SplitDiffWorker executes a diff between a destination shard and its source shards in a shard split case.
StatusWorker is the base type for a worker which keeps a status.
TabletTracker tracks for each tablet alias how often it is currently in use for a streaming read query.
UpdatesQueryBuilder implements the QueryBuilder interface for UPDATE queries.
VerticalSplitDiffWorker executes a diff between a destination shard and its source shards in a shard split case.
# Interfaces
QueryBuilder defines for a given reconciliation type how we have to build the SQL query for one or more rows.
ResultReader is an advanced version of sqltypes.ResultStream.
Worker is the base interface for all long running workers.
# Type aliases
DiffType specifies why a specific row was found as different when comparing a left and right side.
PairList is a slice of Pairs that implements sort.Interface to sort by Value.
StatusWorkerState is the type for a StatusWorker's status.