From 670bf2fd36e0627af5de966c7d0c19b632712e4f Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 15 Oct 2010 11:29:03 +0200 Subject: [PATCH] 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. --- src/db.c | 1 - 1 file changed, 1 deletion(-) 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); } -- 2.45.2