[SERVER-65030] Consider making external user facing commands replSetResizeOplog and setIndexCommitQuorum error when given unrecognized options Created: 29/Mar/22  Updated: 29/Oct/23  Resolved: 22/Aug/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Shin Yee Tan
Resolution: Fixed Votes: 0
Labels: intern-friendly, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by COMPASS-6045 Investigate changes in SERVER-65030: ... Closed
is depended on by TOOLS-3182 Investigate changes in SERVER-65030: ... Closed
Documented
is documented by DOCS-15558 Investigate changes in SERVER-65030: ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-07-25, Execution Team 2022-08-08, Execution Team 2022-08-22, Execution Team 2022-09-05
Participants:

 Description   

The following commands are user-facing but specify {strict: false} for how they parse their input. This means if the operator misspells an argument to the commands or includes a non-existing one, they won't always get an error. Changing these commands to be {strict: true} would protect against this but should be weighed against driver's and/or server's ability to send these commands internally without needing to know which version of the server they are talking with.


import pathlib
import yaml
 
def check_file(pathname):
    with open(pathname) as data:
        blob = yaml.safe_load(data)
    for (command, command_details) in blob.get("commands", {}).items():
        if not command_details.get("strict", True):
            yield command_details["command_name"]
 
for pathname in pathlib.Path().rglob("src/mongo/**/*.idl"):
    if str(pathname) == "src/mongo/idl/unittest.idl":
        continue
    for command in check_file(pathname):
        if not command.startswith("_"):
            print(f"{command} in {pathname}")



 Comments   
Comment by Benety Goh [ 18/Aug/22 ]

Author:

{'name': 'Shin Yee Tan', 'email': 'shinyee.tan@mongodb.com', 'username': 'shinyeet'}

Message: SERVER-65030 make replSetResizeOplog and setIndexCommitQuorum commands strict true
Branch: master
https://github.com/mongodb/mongo/commit/44c6926a700486de3c5f2c320f1d92c8c2cdbff9

Generated at Thu Feb 08 06:01:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.