Details
Description
Hi team,
In the page Modify Chunk Size in a Sharded Cluster, the command to modify the maximum chunk size is:
db.settings.insertOne( { _id:"chunksize", value: <sizeInMB> } ) |
However, if the maximum chunk size has already been modified, this returns a "duplicate key error".
Instead, this command should be an upsert so it's repeatable:
db.settings.updateOne( { _id:"chunksize" }, { $set: { _id:"chunksize", value: <sizeInMB> } }, { upsert: true } ) |
Thanks,
Matt