summaryrefslogtreecommitdiff
path: root/src/db.c
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2019-07-17 08:51:02 +0300
committerOran Agra <oran@redislabs.com>2019-07-17 16:40:24 +0300
commit56258c6b7d26b6ee44bf31b18e9aad95d0a0142a (patch)
tree421767e1db948bba5bd9bff86562a5afe57f589e /src/db.c
parent4b2579a0644e469edb80e7c979f44ec7f2724368 (diff)
downloadredis-56258c6b7d26b6ee44bf31b18e9aad95d0a0142a.tar.gz
Module API for Forking
* create module API for forking child processes. * refactor duplicate code around creating and tracking forks by AOF and RDB. * child processes listen to SIGUSR1 and dies exitFromChild in order to eliminate a valgrind warning of unhandled signal. * note that BGSAVE error reply has changed. valgrind error is: Process terminating with default action of signal 10 (SIGUSR1)
Diffstat (limited to 'src/db.c')
-rw-r--r--src/db.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/db.c b/src/db.c
index 51f5a12b4..4a489036a 100644
--- a/src/db.c
+++ b/src/db.c
@@ -60,10 +60,7 @@ robj *lookupKey(redisDb *db, robj *key, int flags) {
/* Update the access time for the ageing algorithm.
* Don't do it if we have a saving child, as this will trigger
* a copy on write madness. */
- if (server.rdb_child_pid == -1 &&
- server.aof_child_pid == -1 &&
- !(flags & LOOKUP_NOTOUCH))
- {
+ if (!hasForkChild() && !(flags & LOOKUP_NOTOUCH)){
if (server.maxmemory_policy & MAXMEMORY_FLAG_LFU) {
updateLFU(val);
} else {