手动移动 chunk
MongoDB分片命令
sh.moveChunk("shop.customer", { customerId: 1000 }, "shard0001")作用
把包含指定键的 chunk 手动移动到目标分片。
适用场景
用于纠正分布不均或安置特定数据。
注意
手动移动可能与 balancer 冲突;大 chunk 的迁移会产生 IO 负载和短暂锁定。
sh.moveChunk("shop.customer", { customerId: 1000 }, "shard0001")把包含指定键的 chunk 手动移动到目标分片。
用于纠正分布不均或安置特定数据。
手动移动可能与 balancer 冲突;大 chunk 的迁移会产生 IO 负载和短暂锁定。