[DOCS-15056] [Server] Change insert() to upsert in page "Modify Chunk Size in a Sharded Cluster" Created: 21/Jan/22  Updated: 13/Nov/23  Due: 05/Feb/22  Resolved: 02/Feb/22

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: 5.0.0, 5.2.0
Fix Version/s: 5.0.0, 5.2.0, 5.3.0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Minor - P4
Reporter: Matthew Javaly Assignee: Joseph Dougherty
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 2 years, 2 weeks, 6 days ago
Epic Link: DOCSP-11702
Story Points: 2

 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


Generated at Thu Feb 08 08:11:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.