- Sharding >
- Sharded Cluster Administration >
- Clear
jumboFlag
Clear jumbo Flag¶
On this page
If MongoDB cannot split a chunk that exceeds the specified chunk size, MongoDB labels the chunk as jumbo.
If the chunk size no longer exceeds the specified chunk size, MongoDB clears the jumbo flag for the chunk
when the mongos rewrites the chunk metadata.
In cases where you need to clear the flag manually, the following
procedures outline the steps to manually clear the jumbo flag.
Procedures¶
Divisible Chunks¶
The preferred way to clear the jumbo flag from a chunk is to
attempt to split the chunk. If the chunk is divisible, MongoDB removes
the flag upon successful split of the chunk.
Find the jumbo Chunk.¶
Run sh.status(true) to find the chunk labeled
jumbo.
For example, the following output from sh.status(true) shows that
chunk with shard key range { "x" : 2 } -->> { "x" : 4 } is
jumbo.
Split the jumbo Chunk.¶
Use either sh.splitAt() or sh.splitFind() to
split the jumbo chunk.
MongoDB removes the jumbo flag upon successful split of the
chunk.
Indivisible Chunks¶
In some instances, MongoDB cannot split the no-longer jumbo chunk,
such as a chunk with a range of single shard key value, and the
preferred method to clear the flag is not applicable. In such cases,
you can clear the flag using the following steps.
Important
Only use this method if the preferred method is not applicable.
Before modifying the config database, always back up the config database.
If you clear the jumbo flag for a chunk that still exceeds the
chunk size, MongoDB will re-label the chunk as jumbo when MongoDB
tries to move the chunk.
Stop the balancer.¶
Disable the cluster balancer process temporarily, following the steps outlined in Disable the Balancer.
Find the jumbo Chunk.¶
Run sh.status(true) to find the chunk labeled
jumbo.
For example, the following output from sh.status(true) shows that
chunk with shard key range { "x" : 2 } -->> { "x" : 3 } is
jumbo.
Update chunks collection.¶
In the chunks collection of the config database, unset the
jumbo flag for the chunk. For example,
Restart the balancer.¶
Restart the balancer, following the steps in Enable the Balancer.
Clear the cached routing information.¶
Step down the config server primary to clear the routing metadata cache from the config servers.