Unverified Commit 5db262b6 authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
Browse files

Merge pull request #5002 from soloestoy/streams-read-or-write

Streams: lookupKey[Read->Write]OrReply in xdel and xtrim
parents e2a9ea04 cc81c6f1
...@@ -2053,7 +2053,7 @@ void xclaimCommand(client *c) { ...@@ -2053,7 +2053,7 @@ void xclaimCommand(client *c) {
void xdelCommand(client *c) { void xdelCommand(client *c) {
robj *o; robj *o;
if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL if ((o = lookupKeyWriteOrReply(c,c->argv[1],shared.czero)) == NULL
|| checkType(c,o,OBJ_STREAM)) return; || checkType(c,o,OBJ_STREAM)) return;
stream *s = o->ptr; stream *s = o->ptr;
...@@ -2094,7 +2094,7 @@ void xtrimCommand(client *c) { ...@@ -2094,7 +2094,7 @@ void xtrimCommand(client *c) {
/* If the key does not exist, we are ok returning zero, that is, the /* If the key does not exist, we are ok returning zero, that is, the
* number of elements removed from the stream. */ * number of elements removed from the stream. */
if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL if ((o = lookupKeyWriteOrReply(c,c->argv[1],shared.czero)) == NULL
|| checkType(c,o,OBJ_STREAM)) return; || checkType(c,o,OBJ_STREAM)) return;
stream *s = o->ptr; stream *s = o->ptr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment