Yangsx-1 commented on code in PR #1704:
URL: https://github.com/apache/kvrocks/pull/1704#discussion_r1306635469
##########
src/commands/cmd_stream.cc:
##########
@@ -205,6 +206,92 @@ class CommandXDel : public Commander {
std::vector<redis::StreamEntryID> ids_;
};
+class CommandXGroup : public Commander {
+ public:
+ Status Parse(const std::vector<std::string> &args) override {
+ CommandParser parser(args, 1);
+ subcommand_ = util::ToLower(GET_OR_RET(parser.TakeStr()));
+ stream_name_ = GET_OR_RET(parser.TakeStr());
+ group_name_ = GET_OR_RET(parser.TakeStr());
+ if (std::isdigit(group_name_[0])) {
+ return {Status::RedisParseErr, "group name cannot start with number"};
+ }
Review Comment:
Oh yes, it's better in Stream::CreateGroup.
--
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]