-
Notifications
You must be signed in to change notification settings - Fork 500
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. #479
base: unstable
Are you sure you want to change the base?
Add lfu support for debug object command. #479
Conversation
I checked other place using |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #479 +/- ##
============================================
+ Coverage 69.81% 69.84% +0.03%
============================================
Files 109 109
Lines 61792 61801 +9
============================================
+ Hits 43139 43167 +28
+ Misses 18653 18634 -19
|
9eac8da
to
f713c9e
Compare
Signed-off-by: jiangyujie.jyj <yjjiang1996@163.com>
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. |
Signed-off-by: jiangyujie.jyj <yjjiang1996@163.com>
Signed-off-by: jiangyujie.jyj <yjjiang1996@163.com>
Yes, that makes sense. Just merge two fields into one reply. |
Problem
For
debug object
command, we useval->lru
but ignore thelfu
mode.So in
lfu
mode,debug object
would return meaninglesslru
descriptions.Solution:
In
lfu
mode:In other mode: