torwig commented on code in PR #2819:
URL: https://github.com/apache/kvrocks/pull/2819#discussion_r1984616109
##########
src/commands/cmd_key.cc:
##########
@@ -336,6 +336,30 @@ class CommandPersist : public Commander {
}
};
+class CommandDelPrefix : public Commander {
+ public:
+ Status Execute(engine::Context &ctx, Server *srv, Connection *conn,
std::string *output) override {
+ if (args_.size() != 2) {
+ return {Status::RedisParseErr, "wrong number of arguments for
'DELPREFIX' command"};
+ }
+
+ std::string prefix = args_[1];
+ auto storage = srv->storage;
Review Comment:
Why do we introduce a new variable just to use it in a single place?
--
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]