[SERVER-65094] Modularize common code between setClusterParameter commands Created: 30/Mar/22  Updated: 29/Oct/23  Resolved: 24/Jun/22

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

Type: Task Priority: Major - P3
Reporter: Varun Ravichandran Assignee: Varun Ravichandran
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Security 2022-05-02, Security 2022-06-13, Security 2022-06-27
Participants:

 Description   

In SERVER-63870, some code was duplicated between setClusterParameter and _configsvrSetClusterParameter. This primarily entails the logic to transform the BSON in the command argument into the on-disk format and validate the server parameter. This code can be modularized into a single method that is shared by both commands, and we must also create a struct to refer the _id and clusterParameterTime fields instead of hardcoding the name directly.

Additionally, there may be opportunity to move some of the checks on the request itself into a `validateRequest()` method. This needs some more investigation.



 Comments   
Comment by Githook User [ 24/Jun/22 ]

Author:

{'name': 'Varun Ravichandran', 'email': 'varun.ravichandran@mongodb.com', 'username': 'varunravi98'}

Message: SERVER-65094: Modularize redundant code in setClusterParameter commands
Branch: master
https://github.com/mongodb/mongo/commit/2dcc30b440a353398dad765295ff840a779fd0ee

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