schematools

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareSchemas

func CompareSchemas(
	ctx context.Context,
	ts *topo.Server,
	tmc tmclient.TabletManagerClient,
	source *topodatapb.TabletAlias,
	dest *topodatapb.TabletAlias,
	tables []string,
	excludeTables []string,
	includeViews bool,
) (diffs []string, err error)

CompareSchemas returns (nil, nil) if the schema of the two tablets match. If there are diffs, they are returned as (diffs []string, nil).

If fetching the schema for either tablet fails, a non-nil error is returned.

func GetSchema

GetSchema makes an RPC to get the schema from a remote tablet, after verifying a tablet with that alias exists in the topo.

func ReloadShard

func ReloadShard(ctx context.Context, ts *topo.Server, tmc tmclient.TabletManagerClient, logger logutil.Logger, keyspace, shard, replicationPos string, concurrency *semaphore.Weighted, includePrimary bool) (isPartial bool, ok bool)

ReloadShard reloads the schema for all replica tablets in a shard, after they reach a given replication position (empty pos means immediate).

In general, we don't always expect all replicas to be ready to reload, and the periodic schema reload makes them self-healing anyway. So we do this on a best-effort basis, and log warnings for any tablets that fail to reload within the context deadline.

Types

This section is empty.

Jump to

Keyboard shortcuts

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