You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
feat(keyspace): emit set and del notifications (#3541)
Implement initial keyspace notifications for set and del events,
compatible with Redis notify-keyspace-events.
This PR adds the initial notification emitters and configuration
support:
- Support `K`, `E`, `g`, `$`, and `A` flags, where `A` currently expands
to the implemented event classes `g$`.
- Emit `set` notifications only when the shared `Set` path actually
applies a write, including conditional `SET` variants.
- Emit `del` notifications only for keys that are actually deleted
through the shared delete path.
- Deduplicate repeated keys in a single delete operation, so the same
key is deleted and notified once.
- Queue notifications inside `MULTI/EXEC` and publish them after a
successful commit.
- Map notification DB names correctly:
- default namespace uses DB `0`
- `redis-databases` namespaces map back to Redis DB indexes
This PR only adds the initial set and del event paths on primary nodes,
keeping the initial patch small and reviewable. Commands sharing the
same underlying mutation APIs may also produce these events.
Replica-side notifications and additional event types, if supported, can
be added in follow-up PRs.
Unsupported notification classes are rejected for now until their
emitters are implemented.
Ref Proposal: #3533
Tracking Issue: #2915
Assisted by Codex/GPT-5.5.
---------
Co-authored-by: hulk <hulk.website@gmail.com>
Co-authored-by: Aleks Lozovyuk <aleks.raiden@gmail.com>
0 commit comments