diff options
author | antirez <antirez@gmail.com> | 2014-10-08 09:09:01 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-10-08 09:09:01 +0200 |
commit | 2df8341c75f46cf2d6ec28804cbda6287766262d (patch) | |
tree | 81096a245466bdf1c54f6a09e03d8626af62c5ae /src/rdb.c | |
parent | 8beb98574ab285c910c50c877d688a11960d5bd5 (diff) | |
download | redis-2df8341c75f46cf2d6ec28804cbda6287766262d.tar.gz |
Define different types of RDB childs.
We need to remember what is the saving strategy of the current RDB child
process, since the configuration may be modified at runtime via CONFIG
SET and still we'll need to understand, when the child exists, what to
do and for what goal the process was initiated: to create an RDB file
on disk or to write stuff directly to slave's sockets.
Diffstat (limited to 'src/rdb.c')
-rw-r--r-- | src/rdb.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -776,6 +776,7 @@ int rdbSaveBackground(char *filename) { redisLog(REDIS_NOTICE,"Background saving started by pid %d",childpid); server.rdb_save_time_start = time(NULL); server.rdb_child_pid = childpid; + server.rdb_child_type = REDIS_RDB_CHILD_TYPE_DISK; updateDictResizePolicy(); return REDIS_OK; } @@ -1236,6 +1237,7 @@ void backgroundSaveDoneHandler(int exitcode, int bysignal) { server.lastbgsave_status = REDIS_ERR; } server.rdb_child_pid = -1; + server.rdb_child_type = REDIS_RDB_CHILD_TYPE_NONE; server.rdb_save_time_last = time(NULL)-server.rdb_save_time_start; server.rdb_save_time_start = -1; /* Possibly there are slaves waiting for a BGSAVE in order to be served |