-
Notifications
You must be signed in to change notification settings - Fork 755
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
Use the correct command proc for the LOOKUP_NOTOUCH exception in lookupKey #1499
Conversation
To avoid any licensing issues, I did not look into the corresponding fix in Redis. I can provide a back-port to Valkey 7.2 if desired. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #1499 +/- ##
============================================
- Coverage 70.84% 70.79% -0.06%
============================================
Files 119 120 +1
Lines 64880 64911 +31
============================================
- Hits 45967 45956 -11
- Misses 18913 18955 +42
|
40cbc65
to
4cfa6fb
Compare
Once CI pass, we can merge it. |
…upKey When looking up a key in no-touch mode, `LOOKUP_NOTOUCH` is set to avoid updating the last access time in `lookupKey`. An exception must be made for the `TOUCH` command which must always update the key. When called from a script, `server.executing_client` will point to the `TOUCH` command, while `server.current_client` will point to e.g. an `EVAL` command. So, we must use the former to find out the currently executing command. This fix addresses the issue where TOUCH wasn't updating key access times when called from scripts like EVAL. Fixes valkey-io#1498 Signed-off-by: Simon Baatz <[email protected]>
4cfa6fb
to
b29a5f8
Compare
@hwware I rebased to the current unstable branch and the CI is green now |
thanks for the fix, merged. |
…upKey (valkey-io#1499) When looking up a key in no-touch mode, `LOOKUP_NOTOUCH` is set to avoid updating the last access time in `lookupKey`. An exception must be made for the `TOUCH` command which must always update the key. When called from a script, `server.executing_client` will point to the `TOUCH` command, while `server.current_client` will point to e.g. an `EVAL` command. So, we must use the former to find out the currently executing command if defined. This fix addresses the issue where TOUCH wasn't updating key access times when called from scripts like EVAL. Fixes valkey-io#1498 Signed-off-by: Simon Baatz <[email protected]> Co-authored-by: Binbin <[email protected]>
…upKey (valkey-io#1499) When looking up a key in no-touch mode, `LOOKUP_NOTOUCH` is set to avoid updating the last access time in `lookupKey`. An exception must be made for the `TOUCH` command which must always update the key. When called from a script, `server.executing_client` will point to the `TOUCH` command, while `server.current_client` will point to e.g. an `EVAL` command. So, we must use the former to find out the currently executing command if defined. This fix addresses the issue where TOUCH wasn't updating key access times when called from scripts like EVAL. Fixes valkey-io#1498 Signed-off-by: Simon Baatz <[email protected]> Co-authored-by: Binbin <[email protected]>
…upKey (valkey-io#1499) When looking up a key in no-touch mode, `LOOKUP_NOTOUCH` is set to avoid updating the last access time in `lookupKey`. An exception must be made for the `TOUCH` command which must always update the key. When called from a script, `server.executing_client` will point to the `TOUCH` command, while `server.current_client` will point to e.g. an `EVAL` command. So, we must use the former to find out the currently executing command if defined. This fix addresses the issue where TOUCH wasn't updating key access times when called from scripts like EVAL. Fixes valkey-io#1498 Signed-off-by: Simon Baatz <[email protected]> Co-authored-by: Binbin <[email protected]>
…upKey (#1499) When looking up a key in no-touch mode, `LOOKUP_NOTOUCH` is set to avoid updating the last access time in `lookupKey`. An exception must be made for the `TOUCH` command which must always update the key. When called from a script, `server.executing_client` will point to the `TOUCH` command, while `server.current_client` will point to e.g. an `EVAL` command. So, we must use the former to find out the currently executing command if defined. This fix addresses the issue where TOUCH wasn't updating key access times when called from scripts like EVAL. Fixes #1498 Signed-off-by: Simon Baatz <[email protected]> Co-authored-by: Binbin <[email protected]>
…upKey (#1499) When looking up a key in no-touch mode, `LOOKUP_NOTOUCH` is set to avoid updating the last access time in `lookupKey`. An exception must be made for the `TOUCH` command which must always update the key. When called from a script, `server.executing_client` will point to the `TOUCH` command, while `server.current_client` will point to e.g. an `EVAL` command. So, we must use the former to find out the currently executing command if defined. This fix addresses the issue where TOUCH wasn't updating key access times when called from scripts like EVAL. Fixes #1498 Signed-off-by: Simon Baatz <[email protected]> Co-authored-by: Binbin <[email protected]>
…upKey (valkey-io#1499) When looking up a key in no-touch mode, `LOOKUP_NOTOUCH` is set to avoid updating the last access time in `lookupKey`. An exception must be made for the `TOUCH` command which must always update the key. When called from a script, `server.executing_client` will point to the `TOUCH` command, while `server.current_client` will point to e.g. an `EVAL` command. So, we must use the former to find out the currently executing command if defined. This fix addresses the issue where TOUCH wasn't updating key access times when called from scripts like EVAL. Fixes valkey-io#1498 Signed-off-by: Simon Baatz <[email protected]> Co-authored-by: Binbin <[email protected]>
When looking up a key in no-touch mode,
LOOKUP_NOTOUCH
is set to avoid updating the last access time inlookupKey
. An exception must be made for theTOUCH
command which must always update the key.When called from a script,
server.executing_client
will point to theTOUCH
command, whileserver.current_client
will point to e.g. anEVAL
command. So, we must use the former to find out the currently executing command if defined.This fix addresses the issue where TOUCH wasn't updating key access times when called from scripts like EVAL.
Fixes #1498