diff options
author | antirez <antirez@gmail.com> | 2011-01-14 09:53:57 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2011-01-14 09:54:41 +0100 |
commit | 360664c9c8da2cbacc5000d7a058c754a36f8ec7 (patch) | |
tree | 9ab275b13502aca47219e3dd9d6a4aa1cc1a6d52 | |
parent | f487bbbfe2222986ccf9674e6714c7dd506a5a16 (diff) | |
download | redis-360664c9c8da2cbacc5000d7a058c754a36f8ec7.tar.gz |
master-slave replication fixed, it was not listing any key using KEYS command in the slave.
-rw-r--r-- | src/db.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -453,6 +453,8 @@ void propagateExpire(redisDb *db, robj *key) { int expireIfNeeded(redisDb *db, robj *key) { time_t when = getExpire(db,key); + if (when < 0) return 0; /* No expire for this key */ + /* If we are running in the context of a slave, return ASAP: * the slave key expiration is controlled by the master that will * send us synthesized DEL operations for expired keys. @@ -464,8 +466,6 @@ int expireIfNeeded(redisDb *db, robj *key) { return time(NULL) > when; } - if (when < 0) return 0; - /* Return when this key has not expired */ if (time(NULL) <= when) return 0; |