-
Notifications
You must be signed in to change notification settings - Fork 968
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
FIELDEXPIRE: update expiration time without updating the hash's value #3027
Comments
we have "FIELDTTL" which applies to both hashes and sets. We probably would it to be "FIELDEXPIRE key seconds field field..." |
Hi @romange, |
yes please, it should work with both sets and hashes. |
I'd like to double check that what you want is "FIELDEXPIRE key sec field1 field2 .." and the return value would be an array of results (0/1). Or, maybe an array of pairs, each item is {key, 0/1}. Potential Issue: |
@azuredream yes the command should return an array of statuses if it succeeded or an error like wrong type or syntax error otherwise.
|
@azuredream I don't mean for this to sound as nagging/pestering, but just for adjusting my expectations: How long do you think it'll take you to implement? I was also hacking away at this, but I see you've made enough contributions that this will probably take you way less time to get to a working state. I was hoping to use |
I've finished research but not started coding yet. If you already have the impl please feel free to open PR. |
As a maintainer - it's a good problem to have 😆 There are enough issues for everyone, we will open a new batch of issues next week. @NegatioN do you need any help? Can you estimate when you can submit a draft PR? @azuredream we also havee this long standing issue: I remember you have made substantial contributions to geo API. would you like to take a stab at it? |
Either works for me. Please feel free to move this to him. And I'll work on 1878. |
@azuredream I'm sorry if I offended, and made you think I was expecting things to get solved very quickly. That was not my intention. The end of the week would be more than quickly enough for my needs anyways. I'll try to take a stab at it though 👍 @romange I might need some pointers along the way. Is it best if I jump on the discord and ask there, if I do? |
Sure! :) You can start with any data structure first - sets or hashes and make it work for them if it's easier for you. |
This should now be done 🙂 Thanks again for the patience and help on the journey. |
Thank you very much @NegatioN ! 🙏🏼 Most probably end of October. |
Is your feature request related to a problem? Please describe.
For ratelimit tracking, we currently use hashes instead of full keys for more efficient bulk retrieval (instead of using hash slots when clustering).
Currently, we need to do
HINCRBY key field 1
and if the value is 1, we do a followupHSETEX key date field 1
.This means increments that happen between the HINCRBY and HSETEX command may be lost because the HSETEX command will always reset it to 1.
The
EXPIRE
command exists to solve this exact problem, so havingHEXPIRE
would prevent race conditions nicely here too.Describe the solution you'd like
HEXPIRE key field duration
Related
#3026 for
HTTL
The text was updated successfully, but these errors were encountered: