diff options
author | Oran Agra <oran@redislabs.com> | 2019-07-17 08:51:02 +0300 |
---|---|---|
committer | Oran Agra <oran@redislabs.com> | 2019-07-17 16:40:24 +0300 |
commit | 56258c6b7d26b6ee44bf31b18e9aad95d0a0142a (patch) | |
tree | 421767e1db948bba5bd9bff86562a5afe57f589e /src/db.c | |
parent | 4b2579a0644e469edb80e7c979f44ec7f2724368 (diff) | |
download | redis-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.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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 { |