From: antirez Date: Sat, 8 Jan 2011 00:42:08 +0000 (+0100) Subject: resolved a problem with delayed loading of keys X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/f1df1739e3f724e787e9a4da0a0f9abb352f65ce resolved a problem with delayed loading of keys --- diff --git a/src/dscache.c b/src/dscache.c index de944971..20c66d59 100644 --- a/src/dscache.c +++ b/src/dscache.c @@ -756,7 +756,8 @@ int cacheScheduleIOPushJobs(int flags) { if (op->type != REDIS_IO_LOAD && flags & REDIS_IO_ONLYLOADS) break; - if (!(flags & REDIS_IO_ASAP) && + /* Don't execute SAVE before the scheduled time for completion */ + if (op->type == REDIS_IO_SAVE && !(flags & REDIS_IO_ASAP) && (now - op->ctime) < server.cache_flush_delay) break; /* Don't add a SAVE job in the IO thread queue if there is already