Documentation ¶
Index ¶
- func BuildCreateTableRequest(table storage.Table, shardVersionUpdate metadata.ShardVersionUpdate, ...) eventdispatch.CreateTableOnShardRequest
- func BuildShardVersionUpdate(table storage.Table, clusterMetadata *metadata.ClusterMetadata, ...) (metadata.ShardVersionUpdate, bool, error)
- func CreateTableOnShard(ctx context.Context, c *metadata.ClusterMetadata, ...) error
- func DispatchDropTable(ctx context.Context, clusterMetadata *metadata.ClusterMetadata, ...) error
- func GetTableMetadata(clusterMetadata *metadata.ClusterMetadata, schemaName, tableName string) (storage.Table, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCreateTableRequest ¶
func BuildCreateTableRequest(table storage.Table, shardVersionUpdate metadata.ShardVersionUpdate, req *metaservicepb.CreateTableRequest) eventdispatch.CreateTableOnShardRequest
func BuildShardVersionUpdate ¶ added in v1.2.7
func BuildShardVersionUpdate(table storage.Table, clusterMetadata *metadata.ClusterMetadata, shardVersions map[storage.ShardID]uint64) (metadata.ShardVersionUpdate, bool, error)
BuildShardVersionUpdate builds metadata.ShardVersionUpdate to assist DDL on the shard.
And if no error is thrown, the returned boolean value is used to tell whether this table is allocated to shard. In some cases, we need to use this value to determine whether DDL can be executed normally。
func CreateTableOnShard ¶
func CreateTableOnShard(ctx context.Context, c *metadata.ClusterMetadata, dispatch eventdispatch.Dispatch, shardID storage.ShardID, request eventdispatch.CreateTableOnShardRequest) error
func DispatchDropTable ¶
func DispatchDropTable(ctx context.Context, clusterMetadata *metadata.ClusterMetadata, dispatch eventdispatch.Dispatch, schemaName string, table storage.Table, version metadata.ShardVersionUpdate) error
func GetTableMetadata ¶ added in v1.2.7
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.