sh.moveChunk()

sh.moveChunk(collection, query, destination)
参数:
  • collection (string) – Specify the sharded collection containing the chunk to migrate.
  • query – Specify a query to identify documents in a specific chunk. Typically specify the shard key for a document as the query.
  • destination (string) – Specify the name of the shard that you wish to move the designated chunk to.

Moves the chunk containing the documents specified by the query to the shard described by destination.

This function provides a wrapper around the moveChunk. In most circumstances, allow the balancer to automatically migrate chunks, and avoid calling sh.moveChunk() directly.

也可以参考

“moveChunk” and “分片” for more information.

MongoDB Manual (Index)

关于

生态系统

格式

资源