Documentation ¶
Index ¶
- func CompareSchemas(ctx context.Context, ts *topo.Server, tmc tmclient.TabletManagerClient, ...) (diffs []string, err error)
- func GetSchema(ctx context.Context, ts *topo.Server, tmc tmclient.TabletManagerClient, ...) (*tabletmanagerdatapb.SchemaDefinition, error)
- func ReloadShard(ctx context.Context, ts *topo.Server, tmc tmclient.TabletManagerClient, ...) (isPartial bool, ok bool)
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 ¶
func GetSchema(ctx context.Context, ts *topo.Server, tmc tmclient.TabletManagerClient, alias *topodatapb.TabletAlias, request *tabletmanagerdatapb.GetSchemaRequest) (*tabletmanagerdatapb.SchemaDefinition, error)
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.