Skip to content

Commit

Permalink
Only run the fast active expire cycle if master & enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Aug 27, 2013
1 parent 303dde3 commit 003cc8a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/redis.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,8 +1180,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)) {
Expand Down

0 comments on commit 003cc8a

Please sign in to comment.