-
Notifications
You must be signed in to change notification settings - Fork 24.4k
FEAT: Add HGETDEL command #13577
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: Add HGETDEL command #13577
Conversation
|
Can I get you opinion about this? |
|
maybe it's more reasonable to extend |
|
HDEL is not extensible (syntax issues), out of these two options i'd go with HGETDEL, but i'm not sure it popular enough to justify a specific command. ping @LiorKogan. |
|
Now that we support Hash Field Expiration, we have an internal PRD with a suggestion for an
Hence, I suggest to introduce |
That seems like a good idea. I can proceed with implementing HGETF. But i think HGETDEL is more straightforward. by HGETF basically we leave the delete operation to another job that determines the expired fields after the execution of command. Or we can check if the expiry time is zero and delete the field immediately in HGETF and so not proceed with the rest of process. The second approach seems to be easier but it entangles two separate use cases in HGETF with an 'if' statement. HGETDEL returns and deletes, so there is no conditional operation. But at the end I am ok with HGETF as well and will be happy to help you implementing it. |
|
Any other opinion on this ? what do you think I should do ? |
|
any updates? |
|
@samanebi i think we need some time to make the decision, i'll let you know if any news. thanks. |
|
any decisions or news ? it has been long time |
|
kindly reminded . code review |
sundb
left a comment
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.
Now this command is exactly the same as hdel, is it not finished yet?
|
Hi @sundb . Thanks for code review . all of your suggestion resolved . |
|
i am facing conflicts with StackExchange/StackExchange.Redis#2863 @sundb |
|
Close via #13798 |
This command is the combination of HGET and HDEL. It works similar to GETDEL. I was using Redis in our company and I came across the need to have such command. We had to split the delete process by using HGET and then HDEL. This required using pipelines. But if such command exist, It would be a lot easier to have this use case.
This command is exactly using HDEL code. The only difference is that it is adding deleted key values to reply. In HDEL we can see that before deleting we retrieve the key values so I used this capability for this command.