On this page
sh.moveChunk()
On this page
Definition
sh.
moveChunk
( namespace, query, destination )-
Moves the chunk that contains the document specified by the
query
to thedestination
shard.sh.moveChunk()
provides a wrapper around themoveChunk
database command and takes the following arguments:Parameter Type Description namespace
string The namespace of the sharded collection that contains the chunk to migrate. query
document An equality match on the shard key that selects the chunk to move. destination
string The name of the shard to move. Important
In most circumstances, allow the balancer to automatically migrate chunks, and avoid calling
sh.moveChunk()
directly.
See also
moveChunk
, sh.splitAt()
, sh.splitFind()
, Sharding, and chunk migration.