[SERVER-64326] Implement setClusterParameter Command For Replica Sets Created: 08/Mar/22  Updated: 30/Mar/22  Resolved: 29/Mar/22

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

Type: Task Priority: Major - P3
Reporter: Adam Rayner Assignee: Adam Rayner
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: Security 2022-03-21, Security 2022-04-04
Participants:

 Description   

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-62263 will handle in-memory updates for rollback).
  • Write a unit test (if possible) to ensure correctness before the integration test can be written alongside getClusterParameter.


 Comments   
Comment by Githook User [ 30/Mar/22 ]

Author:

{'name': 'Adam Rayner', 'email': 'adam.rayner@gmail.com', 'username': 'adamtron'}

Message: SERVER-64326 setClusterParameter command unpacks object parameters and valdiates
Branch: master
https://github.com/mongodb/mongo/commit/dca101cdb1370e25ebf1730a46467a820919c1d5

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