Only run the fast active expire cycle if master & enabled.

This commit is contained in:
antirez 2013-08-27 09:31:43 +02:00
parent 303dde3757
commit 003cc8a4f5

View File

@ -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)) {