[SERVER-47409] writeconcern>1 gives no error on standalone server Created: 08/Apr/20 Updated: 29/Oct/23 Resolved: 08/Jun/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying, Shell |
| Affects Version/s: | 4.2.2 |
| Fix Version/s: | 4.4.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Rohit Kumar | Assignee: | Ryan Timmons |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Steps To Reproduce: | db.collection.insert({name:"xyz"},{w:2}) |
| Sprint: | STM 2020-06-15 |
| Participants: | |
| Story Points: | 3 |
| Description |
|
When i query "db.collection.insertOne({name:"xyz"},{w:2})" gives error on standalone server which is correct but "db.collection.insert({name:"xyz"},{w:2})" does not.
I got it on mongo enterprise 4.2. |
| Comments |
| Comment by Githook User [ 08/Jun/20 ] |
|
Author: {'name': 'Ryan Timmons', 'email': 'ryan.timmons@mongodb.com', 'username': 'rtimmons'}Message: |
| Comment by Carl Champain (Inactive) [ 08/Apr/20 ] |
|
We are passing this ticket to the appropriate team for additional investigation. Updates will be posted on this ticket as they happen. Thank you, |
| Comment by Daniel Pasette (Inactive) [ 08/Apr/20 ] |
|
Hi Rohit, Looks like you've hit an inconsistency in how insert and insertOne are implemented in the shell. They are both documented to only take a writeConcern document as shown here It looks like the insert command is ignoring the w:2 that's passed because it's parsing the options differently. |