Dynamic HZ: separate hz from the configured hz.

This way we can remember what the user configured HZ is, but change the
actual HZ dynamically if needed in the dynamic HZ feature
implementation.
This commit is contained in:
antirez
2018-07-23 14:13:58 +02:00
parent 037b00dece
commit 7b5f0223f8
3 changed files with 15 additions and 9 deletions

View File

@ -924,6 +924,9 @@ struct redisServer {
char *configfile; /* Absolute config file path, or NULL */
char *executable; /* Absolute executable file path. */
char **exec_argv; /* Executable argv vector (copy). */
int config_hz; /* Configured HZ value. May be different than
the actual 'hz' field value if dynamic-hz
is enabled. */
int hz; /* serverCron() calls frequency in hertz */
redisDb *db;
dict *commands; /* Command table */