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
When listening to the keyspace events for built-in complex data structures (LIST, SET, HASH, etc.) we observe that when a complex value is left empty because of the actions of a command, that the value is removed and a del keyspace event emitted. We can interpret this as evidence that the value has been removed.
Using a Redis list for example: open two CLIs and call them "Listener" and "Actor"
The Observation
When listening to the keyspace events for built-in complex data structures (LIST, SET, HASH, etc.) we observe that when a complex value is left empty because of the actions of a command, that the value is removed and a
del
keyspace event emitted. We can interpret this as evidence that the value has been removed.Using a Redis list for example: open two CLIs and call them "Listener" and "Actor"
Listener
CONFIG SET notify-keyspace-events AKE
PSUBSCRIBE __keyspace@0__:*
Actor
LPUSH my:list:value 1 2 3
LPOP my:list:value 3
Listener
Observe the
del
event at the tail of the output. This pattern is true across all built in datatypes.Compared to a RedisJSON value, using the same two Redis CLIs
Listener
CONFIG SET notify-keyspace-events AKE
PSUBSCRIBE __keyspace@0__:*
Actor
JSON.SET my:json:value $ '{"life":42}'
JSON.DEL my:json:value
Listener
We observe no
del
event. AsJSON.DEL
can also remove subsets of the the RedisJSON value we cannot interpretjson.del
as proof of the values removal.Proposal
If a RedisJSON value removed from the database the RedisJSON module should also emit a
del
event for consistency with built-in datatypes.The text was updated successfully, but these errors were encountered: