summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-08-27 09:31:43 +0200
committerantirez <antirez@gmail.com>2013-08-27 09:31:43 +0200
commit9df63fcabf5018b20e1624fb2c5851fc9dd8a8bd (patch)
treed436f575114756d3cb81d8025eca7d82c5b10277
parentf5903846bcb3583302bc96b6dc8d6f639ecb0933 (diff)
downloadredis-9df63fcabf5018b20e1624fb2c5851fc9dd8a8bd.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 d6fb5bde0..54749be01 100644
--- a/src/redis.c
+++ b/src/redis.c
@@ -1144,8 +1144,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)) {