-
Type:
Task
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Security 2022-03-21, Security 2022-04-04
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
All cluster server parameters will be settable only at runtime via the setClusterParameter command. It should accept a single object, where the top-level field name should correspond to a recognized cluster server parameter and the value associated with it should correspond to a valid value for the parameter. It will only return OK if it is able to successfully persist the new value to durable storage on the replica set.
- Implement the mongod version of setClusterParameter. Mongos should not recognize the command for now.
- Ensure that the command is accepted only on replica set primary nodes.
- Validate the new client-provided value for the parameter via the appropriate validate() method corresponding to the cluster server parameter.
- Create a new clusterParameterTime to attach to the updated cluster parameter time. The clusterParameterTime will be based on the current clusterTime.
- Majority write the upsert into the corresponding document in the config.clusterParameters collection. If the write fails, return an error (retries will be deferred to the client and won't leave the replica set permanently inconsistent since
SERVER-62263will handle in-memory updates for rollback). - Write a unit test (if possible) to ensure correctness before the integration test can be written alongside getClusterParameter.