Reset the ttl for additional keys#3673
Merged
antirez merged 1 commit intoredis:unstablefrom Dec 14, 2016
badboy:reset-ttl-on-migrating
Merged
Reset the ttl for additional keys#3673antirez merged 1 commit intoredis:unstablefrom badboy:reset-ttl-on-migrating
antirez merged 1 commit intoredis:unstablefrom
badboy:reset-ttl-on-migrating
Conversation
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
Contributor
Author
|
I did not run any tests due to lack of a proper Cluster setup at the moment, but this fix is kinda trivial when reading the code (ttl is not touched anywhere else) |
Contributor
|
Good work on that @badboy, thanks. I guess we can also kill the |
Contributor
|
Ok killed the ttl init earlier and actually declared ttl / expireat later in the code in a more inner scope. Thanks! |
antirez
added a commit
that referenced
this pull request
Dec 14, 2016
After the fix for #3673 the ttl var is always initialized inside the loop itself, so the early initialization is not needed. Variables declaration also moved to a more local scope.
antirez
added a commit
that referenced
this pull request
Dec 14, 2016
After the fix for #3673 the ttl var is always initialized inside the loop itself, so the early initialization is not needed. Variables declaration also moved to a more local scope.
antirez
added a commit
that referenced
this pull request
Dec 14, 2016
After the fix for #3673 the ttl var is always initialized inside the loop itself, so the early initialization is not needed. Variables declaration also moved to a more local scope.
JackieXie168
pushed a commit
to JackieXie168/redis
that referenced
this pull request
Feb 17, 2017
Reset the ttl for additional keys
JackieXie168
pushed a commit
to JackieXie168/redis
that referenced
this pull request
Feb 17, 2017
After the fix for redis#3673 the ttl var is always initialized inside the loop itself, so the early initialization is not needed. Variables declaration also moved to a more local scope.
JackieXie168
pushed a commit
to JackieXie168/redis
that referenced
this pull request
May 16, 2017
After the fix for redis#3673 the ttl var is always initialized inside the loop itself, so the early initialization is not needed. Variables declaration also moved to a more local scope.
JackieXie168
pushed a commit
to JackieXie168/redis
that referenced
this pull request
Jan 13, 2018
After the fix for redis#3673 the ttl var is always initialized inside the loop itself, so the early initialization is not needed. Variables declaration also moved to a more local scope.
pulllock
pushed a commit
to pulllock/redis
that referenced
this pull request
Jun 28, 2023
Reset the ttl for additional keys
pulllock
pushed a commit
to pulllock/redis
that referenced
this pull request
Jun 28, 2023
After the fix for redis#3673 the ttl var is always initialized inside the loop itself, so the early initialization is not needed. Variables declaration also moved to a more local scope.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
MigrateDefaultPipelineinredis-trib was set to >1
Fixes #3655