[CDRIVER-2665] Consider allow_extra=True for bulk option structs Created: 24/May/18  Updated: 28/Oct/23  Resolved: 17/Sep/18

Status: Closed
Project: C Driver
Component/s: Bulk API, libmongoc
Affects Version/s: 1.10.0
Fix Version/s: 1.13.0

Type: Task Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-4371 Remove handling of extra options for ... Backlog
is related to CDRIVER-2661 mongoc_bulk_update functions reject a... Closed
is related to CDRIVER-2373 IDL for functions that take flexible ... Closed

 Description   

From https://mongodbcr.appspot.com/198870002/:

All of the bulk option structs in generate-opts.py specify allow_extra=False, so none actually accept extra options that we don't know about. That's inconsistent with the non-bulk option structs, which rely on the default allow_extra value of True.



 Comments   
Comment by Kevin Albertson [ 17/Sep/18 ]

Per discussion, we should not allow extra options in this bulk ops since they would not be sent to the server; the user would have no indication they did something wrong.

Our policy for unrecognized options should be:

  • if they are sent to the server, allow them and let the server return an error
  • if they aren't sent to the server, prohibit them in the driver
Comment by Githook User [ 17/Sep/18 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@10gen.com', 'username': 'kevinAlbs'}

Message: Revert "CDRIVER-2665 NEWS: bulk fns allow extra opts"

This reverts commit 80486f6624ea08aa44c81e35ded9fa421e73de87.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/7c49f06f9b53805b1d25e8a9ca4f47a21e852e90

Comment by Githook User [ 17/Sep/18 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@10gen.com', 'username': 'kevinAlbs'}

Message: Revert "CDRIVER-2665 allow extra opts for bulk ops"

This reverts commit d061b3107595eba9a3ab809f6f04580e6b1b2334.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/26a29efba61f6d822c1537d15ffa70d79e47a77b

Comment by Githook User [ 12/Sep/18 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: CDRIVER-2665 NEWS: bulk fns allow extra opts
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/80486f6624ea08aa44c81e35ded9fa421e73de87

Comment by Githook User [ 12/Sep/18 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@10gen.com', 'username': 'kevinAlbs'}

Message: CDRIVER-2665 allow extra opts for bulk ops
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/d061b3107595eba9a3ab809f6f04580e6b1b2334

Generated at Wed Feb 07 21:15:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.