[DOCS-12093] [Server] Define 'ordered' for insertMany Created: 28/Sep/18  Updated: 30/Oct/23  Resolved: 30/Mar/23

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Dan Dascalescu Assignee: Joseph Dougherty
Resolution: Fixed Votes: 0
Labels: bugfix, quick-win
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 45 weeks, 2 days ago

 Description   

Description

The Server docs don't specify the behavior of ordered=true. Let's add the definition. 

 

http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#insertMany:

ordered boolean true optional
If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails.

https://docs.mongodb.com/manual/reference/method/db.collection.insertMany/

ordered boolean Optional. A boolean specifying whether the mongod instance should perform an ordered or unordered insert. Defaults to true.

 

 

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Ashley Brown [ 27/Mar/23 ]

Thanks, matt.broadstone@mongodb.com! We'll get to this fix as soon as we can. 

Comment by Matt Broadstone [ 27/Mar/23 ]

Hi ashley.brown@mongodb.com, the text has not changed since this ticket was filed, I think we should still fix this text to help users understand what ordered means. I tried to re-open the ticket but it put it into "Ready for Work".

Comment by Ashley Brown [ 13/Mar/23 ]

Hi, we're closing this ticket because we believe the ask no longer applies in the current documentation. If you believe this is an error, please reopen the ticket with a comment explaining why and we'll take a look. Thanks!

Comment by Matt Broadstone [ 01/Oct/18 ]

Hi allison.moore, sorry for the late response here. Yes, our documentation is correct, and the python driver has perhaps a slightly more nuanced explanation:

ordered (optional): If True (the default) documents will be inserted on the server serially, in the order provided. If an error occurs all remaining inserts are aborted. If False, documents will be inserted on the server in arbitrary order, possibly in parallel, and all document inserts will be attempted.

Comment by Allison Reinheimer Moore [ 28/Sep/18 ]

matt.broadstone@10gen.com Can you confirm the explanation for ordered in the Node docs is correct? (I'm going to follow up on the server side )

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