summaryrefslogtreecommitdiff
path: root/src/t_set.c
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2018-09-27 18:03:47 +0300
committerOran Agra <oran@redislabs.com>2019-03-20 17:06:22 +0200
commit747174388f305148b0832dd97b9754e2a64bdfef (patch)
tree18f53040c49e2891be5d1e6991cfe9e6e83050de /src/t_set.c
parent3eaa2cdc44a9b0742f0695f44911b92547995836 (diff)
downloadredis-747174388f305148b0832dd97b9754e2a64bdfef.tar.gz
change SORT and SPOP to use lookupKeyWrite rather than lookupKeyRead
like in SUNIONSTORE etc, commands that perform writes are expected to open all keys, even input keys, with lookupKeyWrite
Diffstat (limited to 'src/t_set.c')
-rw-r--r--src/t_set.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/t_set.c b/src/t_set.c
index cbe55aaa4..05d9ee243 100644
--- a/src/t_set.c
+++ b/src/t_set.c
@@ -415,7 +415,7 @@ void spopWithCountCommand(client *c) {
/* Make sure a key with the name inputted exists, and that it's type is
* indeed a set. Otherwise, return nil */
- if ((set = lookupKeyReadOrReply(c,c->argv[1],shared.null[c->resp]))
+ if ((set = lookupKeyWriteOrReply(c,c->argv[1],shared.null[c->resp]))
== NULL || checkType(c,set,OBJ_SET)) return;
/* If count is zero, serve an empty multibulk ASAP to avoid special