[DOCS-15558] Investigate changes in SERVER-65030: Consider making external user facing commands replSetResizeOplog and setIndexCommitQuorum error when given unrecognized options Created: 22/Aug/22  Updated: 13/Nov/23  Resolved: 21/Oct/22

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 6.1.0-rc0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-65030 Consider making external user facing ... Closed
Participants:
Days since reply: 1 year, 15 weeks, 5 days ago
Epic Link: DOCSP-21764

 Description   
Original Downstream Change Summary

No impacts on downstream teams unless replSetResizeOplog and setIndexCommitQuorum commands were being used outside of the documented syntax.

db.adminCommand(

{ replSetResizeOplog: <int>, size: <double>, minRetentionHours: <double> }

)

db.runCommand(

{ setIndexCommitQuorum: <string>, indexNames: [ <document> ], commitQuorum: <int> | <string>, comment: <any> }

)

Description of Linked Ticket

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 Sarah Olson [ 21/Oct/22 ]

Closing on the ground that no documentation is needed. 

Comment by Education Bot [ 22/Aug/22 ]

Fix Version updated for upstream SERVER-65030:
6.1.0-rc0

Generated at Thu Feb 08 08:13:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.