-
Notifications
You must be signed in to change notification settings - Fork 653
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
Add lfu support for DEBUG OBJECT command, added lfu_freq and lfu_access_time_minutes fields #479
Add lfu support for DEBUG OBJECT command, added lfu_freq and lfu_access_time_minutes fields #479
Conversation
I checked other place using |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #479 +/- ##
============================================
+ Coverage 70.22% 70.34% +0.12%
============================================
Files 112 112
Lines 61497 61498 +1
============================================
+ Hits 43185 43261 +76
+ Misses 18312 18237 -75
|
9eac8da
to
f713c9e
Compare
f713c9e
to
311fac2
Compare
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.
can we just add more fields after it? like:
127.0.0.1:6379> debug object a
Value at:0x600000ac6bc0 refcount:1 encoding:embstr serializedlength:2 lru:3969189 lru_seconds_idle:2 lfu_freq:7 lfu_access_time:13716
It is mainly used in DEBUG scenarios, so I think some different fields will not affect the use
As we use this one 24-bit field |
we can just set the value to -1 if you think the value is meaningless. since it is a debug command, I don't care about its meaningless values in other fields in different modes. The caller knows which fields it should look at. The current diff is touching a lot of code and i don't like it very much. |
Yes, that makes sense. Just merge two fields into one reply. |
@DarrenJiang13 Hi, sorry for the late repsonse, would you be able to refresh this PR? |
a311b35
to
0ae843b
Compare
0ae843b
to
52ee903
Compare
please sign the DCO |
Signed-off-by: jiangyujie.jyj <yjjiang1996@163.com>
52ee903
to
02d2b60
Compare
…ss_time_minutes fields (valkey-io#479) For `debug object` command, we use `val->lru` but ignore the `lfu` mode. So in `lfu` mode, `debug object` would return meaningless `lru` descriptions. Added two new fields lfu_freq and lfu_access_time_minutes. Signed-off-by: jiangyujie.jyj <yjjiang1996@163.com> Co-authored-by: Binbin <binloveplay1314@qq.com> Signed-off-by: mwish <maplewish117@gmail.com>
…ss_time_minutes fields (valkey-io#479) For `debug object` command, we use `val->lru` but ignore the `lfu` mode. So in `lfu` mode, `debug object` would return meaningless `lru` descriptions. Added two new fields lfu_freq and lfu_access_time_minutes. Signed-off-by: jiangyujie.jyj <yjjiang1996@163.com> Co-authored-by: Binbin <binloveplay1314@qq.com> Signed-off-by: mwish <maplewish117@gmail.com>
…ss_time_minutes fields (#479) For `debug object` command, we use `val->lru` but ignore the `lfu` mode. So in `lfu` mode, `debug object` would return meaningless `lru` descriptions. Added two new fields lfu_freq and lfu_access_time_minutes. Signed-off-by: jiangyujie.jyj <yjjiang1996@163.com> Co-authored-by: Binbin <binloveplay1314@qq.com>
…ss_time_minutes fields (#479) For `debug object` command, we use `val->lru` but ignore the `lfu` mode. So in `lfu` mode, `debug object` would return meaningless `lru` descriptions. Added two new fields lfu_freq and lfu_access_time_minutes. Signed-off-by: jiangyujie.jyj <yjjiang1996@163.com> Co-authored-by: Binbin <binloveplay1314@qq.com>
…ss_time_minutes fields (valkey-io#479) For `debug object` command, we use `val->lru` but ignore the `lfu` mode. So in `lfu` mode, `debug object` would return meaningless `lru` descriptions. Added two new fields lfu_freq and lfu_access_time_minutes. Signed-off-by: jiangyujie.jyj <yjjiang1996@163.com> Co-authored-by: Binbin <binloveplay1314@qq.com> Signed-off-by: Ping Xie <pingxie@outlook.com>
…ss_time_minutes fields (valkey-io#479) For `debug object` command, we use `val->lru` but ignore the `lfu` mode. So in `lfu` mode, `debug object` would return meaningless `lru` descriptions. Added two new fields lfu_freq and lfu_access_time_minutes. Signed-off-by: jiangyujie.jyj <yjjiang1996@163.com> Co-authored-by: Binbin <binloveplay1314@qq.com> Signed-off-by: Ping Xie <pingxie@google.com>
…ss_time_minutes fields (valkey-io#479) For `debug object` command, we use `val->lru` but ignore the `lfu` mode. So in `lfu` mode, `debug object` would return meaningless `lru` descriptions. Added two new fields lfu_freq and lfu_access_time_minutes. Signed-off-by: jiangyujie.jyj <yjjiang1996@163.com> Co-authored-by: Binbin <binloveplay1314@qq.com> Signed-off-by: Ping Xie <pingxie@google.com>
For
debug object
command, we useval->lru
but ignore thelfu
mode.So in
lfu
mode,debug object
would return meaninglesslru
descriptions.Added two new fields lfu_freq and lfu_access_time_minutes.