[SERVER-25459] Create command should reject unknown options Created: 05/Aug/16 Updated: 28/Jan/19 Resolved: 03/Oct/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 3.3.10 |
| Fix Version/s: | 3.4.0-rc1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kyle Suarez | Assignee: | Tess Avitabile (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Sprint: | Query 2016-10-10 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
The create command should reject any unknown options passed to it. Currently, unknown options are ignored. We could probably implement this by adding a catch-all case to the if statement in collection_options.cpp. |
| Comments |
| Comment by Githook User [ 03/Oct/16 ] |
|
Author: {u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}Message: |
| Comment by Tess Avitabile (Inactive) [ 29/Sep/16 ] |
|
This change will only reject top-level unknown options to the create command, and will not look inside the storageEngine option. The storageEngine option is validated by each node in the replica set here, since userCreateNS() is called from applyOps, so each node can validate the storageEngine option according to its storage engine. |
| Comment by Eric Milkie [ 05/Aug/16 ] |
|
What if you pass collection options that are only valid on some storage engines, and you are running on a mixed-storage-engine replica set? |