-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Add new hexpired notification for HFE #13329
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
Conversation
@sundb There is one issue with hmgetCommand(), it may lazily expire several fields and we'll be sending a notification for each field. I guess ideally, we want to send a single notification similar to active expiry. Maybe we can ignore this issue or maybe you can find a solution for that. |
you reminded me of this discussion: #13285 (comment) |
@sundb lol, I just realize I didn't see your comment there and clicked resolve. Sorry about that. Yes, it is a similar discussion. I still feel like lazy expiry is not necessary in cases like hget or hmget but maybe the solution is doing expiry outside as you said. |
Co-authored-by: Ozan Tezcan <ozantezcan@gmail.com>
@tezc i finnaly gave up to move out the expiration code from hashTypeGetValue(), too complex and too many changes. |
@sundb LGTM! It's quite simple and clear! |
Co-authored-by: Ozan Tezcan <ozantezcan@gmail.com>
Upgrade urgency LOW: This is the second Release Candidate for Redis 7.4. Performance and resource utilization improvements ================================================= * #13296 Optimize CPU cache efficiency Changes to new 7.4 new features (compared to 7.4 RC1) ===================================================== * #13343 Hash - expiration of individual fields: when key does not exist - reply with an array (nonexisting code for each field) * #13329 Hash - expiration of individual fields: new keyspace event: `hexpired` Modules API - Potentially breaking changes to new 7.4 features (compared to 7.4 RC1) ==================================================================================== * #13326 Hash - expiration of individual fields: avoid lazy expire when called from a Modules API function
When the hash field expired, we will send a new `hexpired` notification. It mainly includes the following three cases: 1. When field expired by active expiration. 2. When field expired by lazy expiration. 3. When the user uses the `h(p)expire(at)` command, the user will also get a `hexpired` notification if the field expires during the command. ## Improvement 1. Now if more than one field expires in the hmget command, we will only send a `hexpired` notification. 2. When a field with TTL is deleted by commands like hdel without updating the global DS, active expire will not send a notification. --------- Co-authored-by: Ozan Tezcan <ozantezcan@gmail.com> Co-authored-by: Moti Cohen <moti.cohen@redis.com>
When the hash field expired, we will send a new `hexpired` notification. It mainly includes the following three cases: 1. When field expired by active expiration. 2. When field expired by lazy expiration. 3. When the user uses the `h(p)expire(at)` command, the user will also get a `hexpired` notification if the field expires during the command. ## Improvement 1. Now if more than one field expires in the hmget command, we will only send a `hexpired` notification. 2. When a field with TTL is deleted by commands like hdel without updating the global DS, active expire will not send a notification. --------- Co-authored-by: Ozan Tezcan <ozantezcan@gmail.com> Co-authored-by: Moti Cohen <moti.cohen@redis.com>
When the hash field expired, we will send a new
hexpired
notification.It mainly includes the following three cases:
h(p)expire(at)
command, the user will also get ahexpired
notification if the field expires during the command.Improvement
hexpired
notification.