From: antirez Date: Fri, 15 Oct 2010 09:29:03 +0000 (+0200) Subject: Don't increment dirty on expireIfNeeded() as natural expires are not considered datab... X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/670bf2fd36e0627af5de966c7d0c19b632712e4f?ds=sidebyside Don't increment dirty on expireIfNeeded() as natural expires are not considered database changes. This will avoid useless read-only commands in the AOF file as a result of, for instance, a GET operation triggering an expirIfNeeded() call resulting in an expired key removed. --- diff --git a/src/db.c b/src/db.c index c1ce79b5..da7537f4 100644 --- a/src/db.c +++ b/src/db.c @@ -468,7 +468,6 @@ int expireIfNeeded(redisDb *db, robj *key) { /* Delete the key */ server.stat_expiredkeys++; - server.dirty++; propagateExpire(db,key); return dbDelete(db,key); }