Fix assertion when a key is lazy expired during cluster key migration#11176
Merged
oranagra merged 4 commits intoredis:unstablefrom Aug 24, 2022
oranagra:fix_cluster_assert_on_lazy_expire
Merged
Fix assertion when a key is lazy expired during cluster key migration#11176oranagra merged 4 commits intoredis:unstablefrom oranagra:fix_cluster_assert_on_lazy_expire
oranagra merged 4 commits intoredis:unstablefrom
oranagra:fix_cluster_assert_on_lazy_expire
Conversation
Redis 7.0 has #9890 which added an assertion when the propagation queue was not flushed and we got to beforeSleep. But it turns out that when processCommands calls getNodeByQuery and decides to reject the command, it can lead to a key that was lazy expired and is deleted without later flushing the propagation queue. This change prevents lazy expiry from deleting the key at this stage (not as part of a command being processed in `call`) Closes #11014 Co-authored-by: Madelyn Olson <[email protected]>
guybe7
reviewed
Aug 23, 2022
zuiderkwast
reviewed
Aug 23, 2022
enjoy-binbin
approved these changes
Aug 24, 2022
zuiderkwast
approved these changes
Aug 24, 2022
Contributor
zuiderkwast
left a comment
There was a problem hiding this comment.
Agree with @enjoy-binbin's minor suggestions.
Co-authored-by: Binbin <[email protected]>
madolson
approved these changes
Aug 24, 2022
Merged
oranagra
added a commit
that referenced
this pull request
Sep 21, 2022
…#11176) Redis 7.0 has #9890 which added an assertion when the propagation queue was not flushed and we got to beforeSleep. But it turns out that when processCommands calls getNodeByQuery and decides to reject the command, it can lead to a key that was lazy expired and is deleted without later flushing the propagation queue. This change prevents lazy expiry from deleting the key at this stage (not as part of a command being processed in `call`) (cherry picked from commit c789fb0)
madolson
pushed a commit
to madolson/redis
that referenced
this pull request
Apr 19, 2023
…redis#11176) Redis 7.0 has redis#9890 which added an assertion when the propagation queue was not flushed and we got to beforeSleep. But it turns out that when processCommands calls getNodeByQuery and decides to reject the command, it can lead to a key that was lazy expired and is deleted without later flushing the propagation queue. This change prevents lazy expiry from deleting the key at this stage (not as part of a command being processed in `call`)
enjoy-binbin
pushed a commit
to enjoy-binbin/redis
that referenced
this pull request
Jul 31, 2023
…redis#11176) Redis 7.0 has redis#9890 which added an assertion when the propagation queue was not flushed and we got to beforeSleep. But it turns out that when processCommands calls getNodeByQuery and decides to reject the command, it can lead to a key that was lazy expired and is deleted without later flushing the propagation queue. This change prevents lazy expiry from deleting the key at this stage (not as part of a command being processed in `call`)
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.
Redis 7.0 has #9890 which added an assertion when the propagation queue
was not flushed and we got to beforeSleep.
But it turns out that when processCommands calls getNodeByQuery and
decides to reject the command, it can lead to a key that was lazy
expired and is deleted without later flushing the propagation queue.
This change prevents lazy expiry from deleting the key at this stage
(not as part of a command being processed in
call)Closes #11014