Skip to content
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

Add new hexpired notification for HFE #2

Open
wants to merge 12 commits into
base: unstable
Choose a base branch
from

Conversation

soohoonc
Copy link
Member

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.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

  • Added 'hexpired' notification for hash field expirations
  • Updated tests/unit/pubsub.tcl to include tests for 'hexpired' notifications
  • Tests cover active expiration, lazy expiration, and immediate expiration using h(p)expire(at) commands
  • Ensured single 'hexpired' notification for multiple field expirations in hmget
  • Prevented redundant notifications when fields with TTL are deleted by commands like hdel

1 file(s) reviewed, no comment(s)

Copy link

@greptile-apps-local greptile-apps-local bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

  • Added hexpired notification for hash field expirations
  • New test cases for active, lazy, and immediate expirations
  • Ensured single hexpired notification for multiple expirations in hmget
  • Prevented notifications for TTL fields deleted by commands like hdel

@soohoonc
Copy link
Member Author

@greptileai

Copy link

@greptile-apps-local greptile-apps-local bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

  • Added hexpired notification for hash field expirations
  • New tests for hexpired notification in tests/unit/pubsub.tcl
  • Ensure notifications for active, lazy, and immediate expirations
  • Single notification for multiple field expirations in hmget
  • No notification for TTL field deletions without global DS update

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

  • Added 'hexpired' notification for hash field expiration
  • New tests for 'hexpired' notification in tests/unit/pubsub.tcl
  • Covered active, lazy, and immediate expiration scenarios
  • Improved notification handling for multiple field expirations in hmget
  • Ensured no notification for TTL field deletion without global DS update

1 file(s) reviewed, no comment(s)

sundb and others added 4 commits June 20, 2024 17:26
1. send "hexpired" notification first and then "del"
2. add signalModifiedKey() in hashTypeGetValue()

Co-authored-by: Ozan Tezcan <[email protected]>
Co-authored-by: Moti Cohen <[email protected]>
@soohoonc
Copy link
Member Author

@greptileai

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

  • Added hexpired notification for hash field expirations
  • Modified lookupKeyByPattern in src/sort.c for HFE_LAZY_EXPIRE
  • Updated TTL values in tests/integration/rdb.tcl
  • Added test cases for hexpired in tests/unit/moduleapi/hash.tcl and scan.tcl
  • Updated expiration logic and tests in tests/unit/type/hash-field-expire.tcl

5 file(s) reviewed, no comment(s)

@soohoonc
Copy link
Member Author

@greptileai

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

  • Added tests for hexpired notification feature
  • Ensure notifications for active and lazy expiration of hash fields
  • Verify single notification for multiple field expirations
  • Check for del notification after all fields expire

1 file(s) reviewed, no comment(s)

@soohoonc
Copy link
Member Author

@greptileai

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

(updates since last review)

  • Added hexpired notification for hash field expiration
  • New tests for hexpired notification in tests/unit/pubsub.tcl
  • Scenarios covered: active expiration, lazy expiration, command-triggered expiration
  • Single hexpired notification for multiple field expirations in hmget
  • No notification for TTL field deletions without global DS update

1 file(s) reviewed, no comment(s)

@soohoonc
Copy link
Member Author

References: redis#13329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants