]> git.saurik.com Git - redis.git/commitdiff
resolved a problem with delayed loading of keys
authorantirez <antirez@gmail.com>
Sat, 8 Jan 2011 00:42:08 +0000 (01:42 +0100)
committerantirez <antirez@gmail.com>
Sat, 8 Jan 2011 00:42:08 +0000 (01:42 +0100)
src/dscache.c

index de9449710b0d1ec6102a4a105158c532d90288ba..20c66d5926dfb13548fb5246fd50a6fef90b0afd 100644 (file)
@@ -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