diff options
author | antirez <antirez@gmail.com> | 2018-10-22 17:43:48 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2018-10-22 17:43:48 +0200 |
commit | 54e8dd11ff4296b6633775c29e62222ed0244960 (patch) | |
tree | d95d49ad16c7941f929eef9ce93513ce7de720fb /src/cluster.c | |
parent | 0f18d8e0ed529bbb4699c8b2072656019a0dd726 (diff) | |
download | redis-54e8dd11ff4296b6633775c29e62222ed0244960.tar.gz |
Use guide comments to make changes in #5462 more obvious.
Diffstat (limited to 'src/cluster.c')
-rw-r--r-- | src/cluster.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cluster.c b/src/cluster.c index 7620b178a..b253efe1f 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -5181,6 +5181,10 @@ try_again: } if (ttl < 1) ttl = 1; } + + /* Relocate valid (non expired) keys into the array in successive + * positions to remove holes created by the keys that were present + * in the first lookup but are now expired after the second lookup. */ kv[non_expired++] = kv[j]; serverAssertWithInfo(c,NULL, @@ -5209,6 +5213,8 @@ try_again: if (replace) serverAssertWithInfo(c,NULL,rioWriteBulkString(&cmd,"REPLACE",7)); } + + /* Fix the actual number of keys we are migrating. */ num_keys = non_expired; /* Transfer the query to the other node in 64K chunks. */ |