Chunk Management in Directory Based Sharding
As with user-defined sharding, tablespaces created for directory-based sharding are assigned to chunks.
The total number of chunks is defined by the number of partitions specified in the
sharded table. The number of chunks for a given shardspace is the number of partitions
assigned to it. The ALTER TABLE ADD
, DROP
, and
SPLIT PARTITION
commands on
the sharded table increases or decrease the number of chunks.
The GDSCTL SPLIT CHUNK
command, which is used to split a chunk in the
middle of the hash range for system-managed sharding, is not supported for
directory-based sharding. You must use the ALTER TABLE SPLIT PARTITION
statement to split a chunk.
Also, just like user-defined sharding, no chunk migration is automatically
started when a shard is added to the distributed database. You must run the GDSCTL MOVE CHUNK
command for each chunk that
needs to be moved to another shard.