summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Erik Rediger <janerik@fnordig.de>2016-12-08 14:27:21 +0100
committerantirez <antirez@gmail.com>2016-12-14 12:41:21 +0100
commit788e892534c77f785c76bdefba506809310ab12a (patch)
tree8c41804e59227037ce2df4402c9fdba6c0a30103
parent77de5c2b717bb24649f4bc448e3326b1d1218207 (diff)
downloadredis-788e892534c77f785c76bdefba506809310ab12a.tar.gz
Reset the ttl for additional keys
Before, if a previous key had a TTL set but the current one didn't, the TTL was reused and thus resulted in wrong expirations set. This behaviour was experienced, when `MigrateDefaultPipeline` in redis-trib was set to >1 Fixes #3655
-rw-r--r--src/cluster.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cluster.c b/src/cluster.c
index 2dd3344c6..f128a9778 100644
--- a/src/cluster.c
+++ b/src/cluster.c
@@ -4743,6 +4743,7 @@ try_again:
/* Create RESTORE payload and generate the protocol to call the command. */
for (j = 0; j < num_keys; j++) {
+ ttl = 0;
expireat = getExpire(c->db,kv[j]);
if (expireat != -1) {
ttl = expireat-mstime();