-
Type: Bug
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: IDL
-
None
-
Service Arch
-
Fully Compatible
-
ALL
the on_update handler for server parameters with storage should not return a Status. Because we call it after storing the value, it can cause us to store an illegal value, report it via getParameter, but not have that updated value reflected in the rest of the system.
See onUpdateFTDCDirectorySize:
Status onUpdateFTDCDirectorySize(const std::int32_t potentialNewValue) { if (potentialNewValue < ftdcStartupParams.maxFileSizeMB.load()) { return Status( ErrorCodes::BadValue, str::stream() << "diagnosticDataCollectionDirectorySizeMB must be greater than or equal to '" << ftdcStartupParams.maxFileSizeMB.load() << "' which is the current value of diagnosticDataCollectionFileSizeMB."); } auto controller = getGlobalFTDCController(); if (controller) { controller->setMaxDirectorySizeBytes(potentialNewValue * 1024 * 1024); } return Status::OK(); }
For an example of where we probably should have had a validator + on_update handler, but by merging into one have allowed the observable value and the use of that value to drift out of sync
- related to
-
SERVER-61973 Remove TODOs linked to SERVER-40224
- Closed