chris
(Chris Dellaway)
2
Hello @GaryxIO
Is this on a new MongoDB 8.0 sharded cluster?
Running sh.enableAutoSplit() on MongoDB 7.0 returns a deprecation warning:
sh.enableAutoSplit()
DeprecationWarning: Starting in MongoDB 6.0.3, automatic chunk splitting is not performed. This is because of balancing policy improvements. Auto-splitting commands still exist, but do not perform an operation. For details, see Balancing Policy Changes: https://www.mongodb.com/docs/manual/release-notes/6.0/#balancing-policy-changes
This is also returned on a 7.0 cluster upgraded to 8.0. But on a new 8.0 cluster I also receive the same output MongoServerError: Document failed validation. This may be a bug.
As the message from my output suggests the command is deprecated due to changes in the balancing policy.
Balancing Policy Changes
Starting in MongoDB 6.0.3, data in sharded clusters is distributed based on data size rather than number of chunks. Be aware of the following significant changes in sharded cluster data distribution behavior:
- The balancer distributes ranges of data rather than chunks. The balancing policy looks for >evenness of data distribution rather than chunk distribution.
- Chunks are not subject to auto-splitting. Instead, chunks are split only when moved across shards.
- A chunk is now referred to as a range.
moveRange has replaced moveChunk.
Note
Starting in MongoDB 6.0.3, automatic chunk splitting is not performed. This is because of balancing policy improvements. Auto-splitting commands still exist, but do not perform an operation.
https://www.mongodb.com/docs/manual/release-notes/6.0/#balancing-policy-changes
https://www.mongodb.com/docs/manual/reference/method/sh.enableAutoSplit/#sh.enableautosplit