Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

master-slave replication fixed, it was not listing any key using KEYS…

… command in the slave.
  • Loading branch information...
commit 360664c9c8da2cbacc5000d7a058c754a36f8ec7 1 parent f487bbb
@antirez authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/db.c
View
4 src/db.c
@@ -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;

0 comments on commit 360664c

Please sign in to comment.
Something went wrong with that request. Please try again.