-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Introduce Hash Field Expiration to the Spring Data Redis framework #3054
base: main
Are you sure you want to change the base?
Introduce Hash Field Expiration to the Spring Data Redis framework #3054
Conversation
@tishun Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
hi @tishun ! Is it any updates about your PR? i guess it`s wating for you to take action? |
Hey @leonovdmitry , The current agreement with the Pivotal team is for them to try and review and push this change with the 3.5 release. Mid-January was a tentative and nonbinding ETA that I hope we will be able to meet to start work on approving this. In the mean time if you feel there are use cases that we've missed please let me know. I have a follow-up commit for the |
@tishun thank you for feedback, yep, i was a bit surprised not to find this function in the current library version, but happy to see PR, so thanks for your work. About use cases, I don't know if this could be part of the core, but it would be convenient to have a method for get/set ttl for only one field with the result in the form of a response code(Long) and not a list of codes(List) Good luck and have a nice day! |
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.
Thanks for your pull request. There are some minor things to be updated. Can you please squash your commits and force-push these along with a DCO sign-off in the commit message?
src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java
Outdated
Show resolved
Hide resolved
src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java
Outdated
Show resolved
Hide resolved
662c20c
to
5b987c3
Compare
Signed-off-by: Tihomir Mateev <[email protected]>
5b987c3
to
ea7e8c4
Compare
Addressed the review comments and added the signoff. Also added changes to the RedisMap, please have a look at them so we do not miss them |
Thank you again for the PR @tishun. From what I've seen so far things look pretty good, still I think there are a couple of things we need to take care of before we can actually bring the change in. It would be nice if:
|
Hey @christophstrobl , thanks for spending time and looking at this change!
Sure! Could you please confirm my understanding of your comments (below)?
Apologies, I may need some elaboration on If there are some differences in the naming of the API methods it is because I was aiming at consistency with the existing codebase, for example
It is, actually we always are always executing
@mp911de mentioned (weird, I cant see this comment now, is it because I force pushed?) that the I seem to use TimeUnit only for httl (since I combined them both with HPTTL). When I make the change from the previous point I will completely remove the use of Does that make sense?
I omitted that because it was missing for key expiration too. If you think it is important I will add it to the existing APIs.
Oh, I seem to have missed the entire ReactiveHashOperations interface. So many of them. Will address this too.
Well ... this would be a rather huge inconsistency if I am getting this right. class HashOperations {
...
Long delete(H key, Object... hashKeys);
List<HV> multiGet(H key, Collection<HK> hashKeys);
... Did you mean we should, instead of returning a List of results, rather return a Map of <Field, Result>?
... and not do the above for Reactive methods? |
This change introduces the Hash Field Expiration feature as part of the features provided by the spring-data-redis project.
As part of the change the following commands would be made available:
The new commands are available as part of the following interfaces:
(based on similar PR #283)
This feature is available starting from Redis CE version 7.4.x and later
For more information on HFE you can also check out ...
... the blog article on the topic.
... examples of how one can take advantage of the feature in their application