torwig commented on code in PR #1712:
URL: https://github.com/apache/kvrocks/pull/1712#discussion_r1309857035
##########
src/commands/cmd_key.cc:
##########
@@ -236,12 +236,16 @@ class CommandPersist : public Commander {
class CommandDel : public Commander {
public:
Status Execute(Server *svr, Connection *conn, std::string *output) override {
- int cnt = 0;
- redis::Database redis(svr->storage, conn->GetNamespace());
+ std::vector<rocksdb::Slice> keys;
Review Comment:
Others LGTM.
##########
src/commands/cmd_key.cc:
##########
@@ -236,12 +236,16 @@ class CommandPersist : public Commander {
class CommandDel : public Commander {
public:
Status Execute(Server *svr, Connection *conn, std::string *output) override {
- int cnt = 0;
- redis::Database redis(svr->storage, conn->GetNamespace());
+ std::vector<rocksdb::Slice> keys;
Review Comment:
Could we call `reserve` here for the vector before adding the known number
of elements to it?
--
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]