feat(server): expiry notifications (#3154)

Adds basic support for keyspace notifications, only Ex

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
This commit is contained in:
Vladislav 2024-06-24 16:23:40 +03:00 committed by GitHub
parent 3fd43eeda8
commit 4357933775
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 143 additions and 86 deletions

View file

@ -569,6 +569,9 @@ class DbSlice {
// Registered by shard indices on when first document index is created.
DocDeletionCallback doc_del_cb_;
// Record whenever a key expired to DbTable::expired_keys_events_ for keyspace notifications
bool expired_keys_events_recording_ = true;
struct Hash {
size_t operator()(const facade::Connection::WeakRef& c) const {
return std::hash<uint32_t>()(c.GetClientId());