Updateable Configuration
Scylla source of configuration is config.cc
that is read from scylla.yml
.
Following PR #4559 It is now possible to modify
the configuration file, send a kill SIGHUP
to scylla and the configuration will be re-read from the file.
There are some changes that need to be done in the code so that the new configuration will take effect.
When changing the configuration you can use the API to check the current value of a parameter.
curl -X GET http://{ip}:10000/v2/config/{name}
For example, if your Scylla server is using 172.17.0.2 and you want to check the value of 172.17.0.2
Use:
curl -X GET "http://172.17.0.2:10000/v2/config/auto_adjust_flush_quota"
Add the liveness flag before the used flag:
...,liveness::LiveUpdate, value_status::Used,...
If you store a config parameter in the code use utils::updateable_value
template.
For example change:
bool compaction_enforce_min_threshold = false;
To:
utils::updateable_value<bool> compaction_enforce_min_threshold{false};
An unpdateable_value is an object, you need to use the parenthesis operator ()
to get the value.
For example:
compaction_enforce_min_threshold()