From 76ca46d0203aee73f79aceb73cc156ae2f5e0eb4 Mon Sep 17 00:00:00 2001 From: antirez Date: Sat, 8 Jan 2011 01:42:08 +0100 Subject: [PATCH] resolved a problem with delayed loading of keys --- src/dscache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dscache.c b/src/dscache.c index de9449710..20c66d592 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