[SERVER-60622] Fix typos in update_driver.cpp error messages Created: 12/Oct/21  Updated: 29/Oct/23  Resolved: 29/Oct/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.3.1, 4.3.2, 4.3.3, 4.3.4, 4.3.5, 4.3.6, 4.4.0, 4.4.1, 5.0.0, 4.7.0, 4.4.2, 4.2.11, 4.4.3, 4.2.12, 4.4.4, 4.2.13, 4.4.5, 4.2.14, 4.4.6, 4.2.15, 5.0.1, 4.4.7, 4.2.16, 4.4.8, 5.0.2, 5.0.3, 4.4.9, 4.2.17
Fix Version/s: 5.2.0

Type: Bug Priority: Trivial - P5
Reporter: Martin Müller Assignee: James Wahlin
Resolution: Fixed Votes: 0
Labels: neweng, pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Run query (e.g. in mogosh) that triggers error and shows the error message with the type, e.g. use pipeline-style update when it is not supported:

 

db.foo.updateOne({}, [ { $set: { "foo.$[elem]": 1 } } ], { arrayFilters: [ { elem: 0 } ] })

This triggers following error message with the described typo ("syle" instead of "style"):

"MongoServerError: arrayFilters may not be specified for pipeline-syle updates"

 

Sprint: QO 2021-11-15
Participants:

 Description   

For some unsupported update queries with arrayFilters error messages are shown with a typo ("syle" instead of "style").

For recent versions of MongoDB server, these are the affected error messages (taken from mongo/src/mongo/db/update/update_driver.cpp):

  • "arrayFilters may not be specified for pipeline-syle updates"
  • "arrayFilters may not be specified for delta-syle updates"
  • "arrayFilters may not be specified for transform-syle updates"

A pull request was submitted to the GitHub repository to address this issue: https://github.com/mongodb/mongo/pull/1424



 Comments   
Comment by James Wahlin [ 29/Oct/21 ]

Thanks for your contribution martin.mueller@cemas.io. Your patch has been committed to our master branch:

https://github.com/mongodb/mongo/commit/6ed9f24dc8470f6f7010f7b5cf6dba8db7c9e376

Comment by Githook User [ 29/Oct/21 ]

Author:

{'name': 'martin-mueller-cemas', 'email': '88337177+martin-mueller-cemas@users.noreply.github.com', 'username': 'martin-mueller-cemas'}

Message: SERVER-60622 Fix typos in update_driver.cpp error messages
Branch: master
https://github.com/mongodb/mongo/commit/6ed9f24dc8470f6f7010f7b5cf6dba8db7c9e376

Comment by Eric Sedor [ 18/Oct/21 ]

Thanks martin.mueller@cemas.io, I'll pass this on for consideration

Comment by Martin Müller [ 13/Oct/21 ]

Hi Eric Sedor, you're welcome!

I've signed the contributor agreement as requested and hope this helps making MongoDB even better

Regards,

Martin

Comment by Eric Sedor [ 12/Oct/21 ]

Hi martin.mueller@cemas.io, and thank you.

Can you please sign our contributor agreement? This will allow us to consider your PR.

Sincerely,
Eric

Generated at Thu Feb 08 05:50:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.