-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(server): SCAN command add ATTR options #4766
base: main
Are you sure you want to change the base?
Conversation
There is Another question, i want to add some python test cases, but redis.Redis scan function has only these options:
|
Yes, good point. We mark the keys and do it irrespective of tiering, so it should work well for this issue. Regarding the testing - I believe this falls well into the unit test territory, I would add the tests to |
vec = StrArray(resp.GetVec()[1]); | ||
EXPECT_EQ(2, vec.size()); | ||
|
||
ASSERT_THAT(Run({"get", "foo"}), "bar"); |
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.
@romange In this test case, i found that running "get" of some key, it wiil not make the key touched
, so this test case failed, can you have a look what is wrong?
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 makes the key touched and you can verify it by adding debug printings for example at line db_slice.cc:624
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 makes the key touched and you can verify it by adding debug printings for example at line db_slice.cc:624
i see what is wrong, HasExpire() works on it->second object(which is value), while HasTouched() works on it->first object(which is key), is that expected?
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.
yes, this by design though I agree it's confusing.
the reason is that if you call "SADD foo bar" and then SET foo bar
then all the attributes on the value (second) will be reset. if we want to preserve the attributes we should use keys (first)
@lichuang a friendly ping :) |
sorry, i am a little busy these days, i will finish it ASAP. |
feat(server): SCAN command add ATTR options
fix #4537