Get the App
SLTechnology News&Howtos  ›  Database  › 

[MongoDB] the solution of chunk too big to move

Shulou Source: shulou.com Published: 2022-06-01 12:03:19 11月12日 Update

When the amount of data in some blocks is extremely large, forming a large block, Balancer cannot split the data block, and it cannot move the block. Using MongDB version 3.2, the solution is as follows:

1. Close Balancer first

sh.stopBalancer()

2. Query Mega Block

use configdb.chunks.find({jumbo:true})

3. Splitting Mega Blocks

sh.splitAt("db.collection", {shardkye:"split threshold"})

4. Move blocks manually (optional step)

sh.moveChunk("db.collection", {shardkey:"shardkey block"}, "target shard ID to move");

5. Restart Balancer

sh.startBalancer()

Tags: Extra large data solution solution threshold location Manual time step version Target query move Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft vpn Shulou Technology Linux macOS