git-hulk commented on code in PR #1502:
URL:
https://github.com/apache/incubator-kvrocks/pull/1502#discussion_r1236173943
##########
src/commands/cmd_zset.cc:
##########
@@ -1285,6 +1345,7 @@ REDIS_REGISTER_COMMANDS(MakeCmdAttr<CommandZAdd>("zadd",
-4, "write", 1, 1, 1),
MakeCmdAttr<CommandZScore>("zscore", 3, "read-only",
1, 1, 1),
MakeCmdAttr<CommandZMScore>("zmscore", -3,
"read-only", 1, 1, 1),
MakeCmdAttr<CommandZScan>("zscan", -3, "read-only", 1,
1, 1),
- MakeCmdAttr<CommandZUnionStore>("zunionstore", -4,
"write", 1, 1, 1), )
+ MakeCmdAttr<CommandZUnionStore>("zunionstore", -4,
"write", 1, 1, 1),
+ MakeCmdAttr<CommandZUnion>("zunion", -4, "read-only",
1, 1, 1), )
Review Comment:
Looks like the ZUNIONSTORE command wrongly passed the key position. For the
ZUNIONSTORE/ZUNION command, its key positions need to calculate by the
[numkeys] argument. Can refer to the `CommandZMPop::Range` implementation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]