Repository navigation
Added support for subkey notifications - #4040
Merged
Merged
Conversation
vladvildanov
marked this pull request as draft
April 21, 2026 08:45
π‘οΈ Jit Security Scan Resultsβ No security findings were detected in this PR
Security scan by Jit
|
vladvildanov
marked this pull request as ready for review
April 24, 2026 07:32
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
β Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c0e4d3d. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description of change
This PR brings a support for subkey notifications feature introduced in Redis 8.8. The design introduces four subkey notification channel families in addition to the existing keyspace and keyevent channels.
subkeyspace__subkeyspace@<db>__:<key><event>|<subkey_len>:<subkey>[,<subkey_len>:<subkey>...]subkeyevent__subkeyevent@<db>__:<event><key_len>:<key>|<subkey_len>:<subkey>[,<subkey_len>:<subkey>...]subkeyspaceitem__subkeyspaceitem@<db>__:<key>\\n<subkey><event>subkeyspaceevent__subkeyspaceevent@<db>__:<event>|<key><subkey_len>:<subkey>[,<subkey_len>:<subkey>...]The feature is gated by new notify-keyspace-events flags:
For now the subkey notifications supported only by hash data structure.
Pull Request check-list
Please make sure to review and check all of these items:
NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Note
Medium Risk
Adds new public subscription APIs and extends
KeyNotificationparsing to handle new subkey channel wire formats; mistakes could break notification consumers or mis-parse payloads. Risk is mitigated by extensive new sync/async unit + integration tests and version-gated fixtures.Overview
Adds first-class support for Redis 8.8 subkey-aware keyspace notifications by introducing four new channel families (
__subkeyspace,__subkeyevent,__subkeyspaceitem,__subkeyspaceevent) with corresponding channel classes andsubscribe_*convenience methods in both sync and asyncio notification managers.Extends
KeyNotificationto parse these new channel/payload wire formats (including length-prefixed subkey lists), exposessubkeysand rawdata, and updates channel-type detection (ChannelType/get_channel_type) accordingly; exports the new APIs fromredis.__init__.Updates CI to run Redis
8.8tests against a newer unstable image, adds fixtures to enable the newnotify-keyspace-eventsflags (KEASTIV), and adds comprehensive sync/async test coverage for subkey parsing, pattern subscriptions, and backward compatibility with existing keyspace/keyevent notifications.Reviewed by Cursor Bugbot for commit ac4eea0. Bugbot is set up for automated code reviews on this repo. Configure here.