mirror of
https://github.com/fluencelabs/redis
synced 2025-06-17 03:01:20 +00:00
Server: restartServer() API.
This new function is able to restart the server "in place". The current Redis process executes the same executable it was executed with, using the same arguments and configuration file.
This commit is contained in:
@ -694,6 +694,8 @@ struct redisServer {
|
||||
/* General */
|
||||
pid_t pid; /* Main process pid. */
|
||||
char *configfile; /* Absolute config file path, or NULL */
|
||||
char *executable; /* Absolute executable file path. */
|
||||
char **exec_argv; /* Executable argv vector (copy). */
|
||||
int hz; /* serverCron() calls frequency in hertz */
|
||||
redisDb *db;
|
||||
dict *commands; /* Command table */
|
||||
@ -1321,6 +1323,11 @@ void resetServerStats(void);
|
||||
unsigned int getLRUClock(void);
|
||||
const char *maxmemoryToString(void);
|
||||
|
||||
#define RESTART_SERVER_NONE 0
|
||||
#define RESTART_SERVER_GRACEFULLY (1<<0) /* Do proper shutdown. */
|
||||
#define RESTART_SERVER_CONFIG_REWRITE (1<<1) /* CONFIG REWRITE before restart.*/
|
||||
int restartServer(int flags, mstime_t delay);
|
||||
|
||||
/* Set data type */
|
||||
robj *setTypeCreate(sds value);
|
||||
int setTypeAdd(robj *subject, sds value);
|
||||
|
Reference in New Issue
Block a user