mirror of
https://github.com/fluencelabs/redis
synced 2025-06-26 07:21:35 +00:00
Streams: fix XADD API and keyspace notifications.
XADD was suboptimal in the first incarnation of the command, not being able to accept an ID (very useufl for replication), nor options for having capped streams. The keyspace notification for streams was not implemented.
This commit is contained in:
@ -54,6 +54,7 @@ int keyspaceEventsStringToFlags(char *classes) {
|
||||
case 'e': flags |= NOTIFY_EVICTED; break;
|
||||
case 'K': flags |= NOTIFY_KEYSPACE; break;
|
||||
case 'E': flags |= NOTIFY_KEYEVENT; break;
|
||||
case 't': flags |= NOTIFY_STREAM; break;
|
||||
default: return -1;
|
||||
}
|
||||
}
|
||||
@ -79,6 +80,7 @@ sds keyspaceEventsFlagsToString(int flags) {
|
||||
if (flags & NOTIFY_ZSET) res = sdscatlen(res,"z",1);
|
||||
if (flags & NOTIFY_EXPIRED) res = sdscatlen(res,"x",1);
|
||||
if (flags & NOTIFY_EVICTED) res = sdscatlen(res,"e",1);
|
||||
if (flags & NOTIFY_STREAM) res = sdscatlen(res,"t",1);
|
||||
}
|
||||
if (flags & NOTIFY_KEYSPACE) res = sdscatlen(res,"K",1);
|
||||
if (flags & NOTIFY_KEYEVENT) res = sdscatlen(res,"E",1);
|
||||
|
Reference in New Issue
Block a user