summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-08-27 09:31:43 +0200
committerantirez <antirez@gmail.com>2013-12-10 18:58:25 +0100
commite4c6458a946bbcc2bbb9c98a6c82dd5280b9d565 (patch)
tree0b80c40653306b36c09e76efc384f9aa57c624a6
parent9316362ae251fa9bc1815590c3a88a6fcf6356a7 (diff)
downloadredis-e4c6458a946bbcc2bbb9c98a6c82dd5280b9d565.tar.gz
Only run the fast active expire cycle if master & enabled.
-rw-r--r--src/redis.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/redis.c b/src/redis.c
index 6f58570ce..4668abb65 100644
--- a/src/redis.c
+++ b/src/redis.c
@@ -1127,8 +1127,10 @@ void beforeSleep(struct aeEventLoop *eventLoop) {
listNode *ln;
redisClient *c;
- /* Run a fast expire cycle. */
- activeExpireCycle(ACTIVE_EXPIRE_CYCLE_FAST);
+ /* Run a fast expire cycle (the called function will return
+ * ASAP if a fast cycle is not needed). */
+ if (server.active_expire_enabled && server.masterhost == NULL)
+ activeExpireCycle(ACTIVE_EXPIRE_CYCLE_FAST);
/* Try to process pending commands for clients that were just unblocked. */
while (listLength(server.unblocked_clients)) {