Commit 2a32f037 authored by Jan-Erik Rediger's avatar Jan-Erik Rediger
Browse files

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
parent 978a790b
...@@ -4841,6 +4841,7 @@ try_again: ...@@ -4841,6 +4841,7 @@ try_again:
/* Create RESTORE payload and generate the protocol to call the command. */ /* Create RESTORE payload and generate the protocol to call the command. */
for (j = 0; j < num_keys; j++) { for (j = 0; j < num_keys; j++) {
ttl = 0;
expireat = getExpire(c->db,kv[j]); expireat = getExpire(c->db,kv[j]);
if (expireat != -1) { if (expireat != -1) {
ttl = expireat-mstime(); ttl = expireat-mstime();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment