sapling/eden/fs/config
Adam Simpkins aa45fa2cb7 periodically reload the config files
Summary:
Add a periodic task to reload the configuration file from disk.  By default
this runs once every 5 minutes, but this interval can be controlled from the
config file.

At the moment reloading the config file does not do much other than update the
interval for how frequently the config file is reloaded.  However, I plan to
add additional periodic tasks shortly that are controlled by this config
setting.

This will also make it possible for other parts of the code to
access the config settings in the `ServerState` and use them as-is without
checking to see if they reloaded.  Currently all of the code that accesses
config values performs a check to see if the config needs to be reloaded.  If
we want to switch to Mercurial-style configs in the future that check will be
substantially more expensive.

This diff also includes a new thrift call to force the config file to be
reloaded immediately.  This can be used to restart automatic config reloading
if it is ever disabled in the config file.

Reviewed By: wez

Differential Revision: D15756357

fbshipit-source-id: 1999f4730903633ce838842932a6ae6a65eda4e6
2019-06-14 18:14:43 -07:00
..
test make ConfigSetting<bool>::getStringValue() return true/false 2019-06-11 13:08:29 -07:00
CachedParsedFileMonitor.h Replace EDEN_WIN with _WIN32 for Windows only code 2019-05-09 16:33:08 -07:00
CheckoutConfig.cpp Replace EDEN_WIN with _WIN32 for Windows only code 2019-05-09 16:33:08 -07:00
CheckoutConfig.h rename ClientConfig to CheckoutConfig 2019-05-07 17:41:36 -07:00
CMakeLists.txt move the ConfigSource enum to a thrift file 2019-06-05 11:50:37 -07:00
ConfigSetting.h update FieldConverter API to support converting back to strings 2019-06-11 13:08:29 -07:00
eden_config.thrift add a thrift call for getting config values 2019-06-11 13:08:28 -07:00
EdenConfig.cpp add a thrift call for getting config values 2019-06-11 13:08:28 -07:00
EdenConfig.h periodically reload the config files 2019-06-14 18:14:43 -07:00
FieldConverter.cpp add a config FieldConvertor for parsing nanoseconds 2019-06-11 13:08:29 -07:00
FieldConverter.h make ConfigSetting<bool>::getStringValue() return true/false 2019-06-11 13:08:29 -07:00
FileChangeMonitor.cpp Replace EDEN_WIN with _WIN32 for Windows only code 2019-05-09 16:33:08 -07:00
FileChangeMonitor.h Replace EDEN_WIN with _WIN32 for Windows only code 2019-05-09 16:33:08 -07:00
ReloadableConfig.cpp add some new options for controlling if we reload the config 2019-06-11 13:08:27 -07:00
ReloadableConfig.h add some new options for controlling if we reload the config 2019-06-11 13:08:27 -07:00