-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finish postponed SCAN changes #501
Finish postponed SCAN changes #501
Conversation
Commit 07ed0ea introduced some SCAN improvements, but some changes were postponed to a later version (8.0), which this PR finishes: 1. Prepare to move the TYPE filtering to the scan callback as well. this was put on hold since it has side effects that can be considered a breaking change, which is that we will not attempt to do lazy expire (delete) a key that was filtered by not matching the TYPE (changing it would mean TYPE filter starts behaving the same as MATCH filter already does in that respect). 2. when the specified key TYPE filter is an unknown type, server will reply a error immediately instead of doing a full scan that comes back empty handed. Signed-off-by: Viktor Söderqvist <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #501 +/- ##
============================================
+ Coverage 69.67% 69.80% +0.12%
============================================
Files 109 109
Lines 61801 61797 -4
============================================
+ Hits 43062 43137 +75
+ Misses 18739 18660 -79
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's nice we wrote all these helpful comments in the code. We should do more of that.
Yes, in this case the code was already written but commented out before merge. Should we list it as a breaking change? |
Yeah, as documented in the original issue:
|
Commit 07ed0ea introduced some SCAN improvements, but some changes were postponed to a later version (8.0), which this PR finishes: 1. Prepare to move the TYPE filtering to the scan callback as well. this was put on hold since it has side effects that can be considered a breaking change, which is that we will not attempt to do lazy expire (delete) a key that was filtered by not matching the TYPE (changing it would mean TYPE filter starts behaving the same as MATCH filter already does in that respect). 2. when the specified key TYPE filter is an unknown type, server will reply a error immediately instead of doing a full scan that comes back empty handed. Fixes valkey-io#235 Release notes: > SCAN: Expired keys that don't match the TYPE argument for the SCAN are no longer deleted by SCAN Signed-off-by: Viktor Söderqvist <[email protected]>
Commit 07ed0ea introduced some SCAN improvements, but some changes were postponed to a later version (8.0), which this PR finishes: 1. Prepare to move the TYPE filtering to the scan callback as well. this was put on hold since it has side effects that can be considered a breaking change, which is that we will not attempt to do lazy expire (delete) a key that was filtered by not matching the TYPE (changing it would mean TYPE filter starts behaving the same as MATCH filter already does in that respect). 2. when the specified key TYPE filter is an unknown type, server will reply a error immediately instead of doing a full scan that comes back empty handed. Fixes valkey-io#235 Release notes: > SCAN: Expired keys that don't match the TYPE argument for the SCAN are no longer deleted by SCAN Signed-off-by: Viktor Söderqvist <[email protected]> Signed-off-by: Samuel Adetunji <[email protected]>
Commit 07ed0ea introduced some SCAN improvements, but some changes were postponed to a later version (8.0), which this PR finishes:
Fixes #235
Release notes: