Skip to content

Commit 7d9cbfe

Browse files
authored
replaces call to insertOne with call to updateOne with upsert (#385) (#503)
* replaces call to insertOne with call to updateOne with upsert * spacing fixes
1 parent d365f73 commit 7d9cbfe

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

source/tutorial/modify-chunk-size-in-sharded-cluster.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ To modify the chunk size, use the following procedure:
3434

3535
.. code-block:: javascript
3636

37-
db.settings.insertOne( { _id:"chunksize", value: <sizeInMB> } )
37+
db.settings.updateOne(
38+
{ _id: "chunksize" },
39+
{ $set: { _id: "chunksize", value: <sizeInMB> } },
40+
{ upsert: true }
41+
)
42+
3843

3944
Modifying the chunk size has several limitations:
4045

0 commit comments

Comments
 (0)