Add ability to reconfigure session level options like cache_size, etc.
Command:
This command is surfaced as a setParameter runtime option. It cannot be set at the command line, or via the config file.
{ setParameter : 1, "wiredTigerEngineRuntimeConfigSetting" : "key=value,key=value,..." }
The supported settings are list here in the wired tiger documentation.
Note, we place an additional restriction that we forbid embedded null characters in the string.
{ setParameter : 1, "wiredTigerEngineRuntimeConfigSetting" : "key=value\0,key=value" }
The string will get rejected due to the presence of "\0" (i.e., UTF-8 character 0) in the string.
Results:
On success,
{ ok : 1 }
On failure,
{ "ok" : 0, "errmsg" : "WiredTiger reconfiguration failed with error code (22): Invalid argument" }
Unfortunately, WiredTiger does not provide a detail error message which we can return to the user. WiredTiger simply returns an error code in their API. The log file contains more information from WiredTiger.
Behavior:
The updated config settings are logged to log file. The settings specified in the command are merged with the current wired tiger settings. If they same key is specified in both the current configuration, and new configuration, the value from the new configuration is chosen.
Caveats
There is no way to query the current settings from WiredTiger. getParameter will always return an empty string when this setting is queried.
- is related to
-
SERVER-19483 Allow querying wiredTigerEngineRuntimeConfig via getParameter
- Closed
- related to
-
SERVER-88645 Data race in accessing ServerParameter
- Closed