You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "Chiro11 (via GitHub)" <gi...@apache.org> on 2024/04/11 13:37:50 UTC
[PR] Add support of the command COPY [kvrocks]
Chiro11 opened a new pull request, #2238:
URL: https://github.com/apache/kvrocks/pull/2238
Close #1945
DB number can only be 0 in this command, which doesn't mean anything.
Copying between namespaces will be implemented in another command called `COPYX` in another pr.
Note: Most tests are modified from `rename_test.go`
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#discussion_r1561054399
##########
src/storage/redis_db.cc:
##########
@@ -708,7 +708,7 @@ rocksdb::Status Database::typeInternal(const Slice &key, RedisType *type) {
return rocksdb::Status::OK();
}
-rocksdb::Status Database::Move(const std::string &key, const std::string &new_key, bool nx, bool *ret,
+rocksdb::Status Database::Move(const std::string &key, const std::string &new_key, bool nx, bool delete_old, bool *ret,
bool *key_exist) {
Review Comment:
Please unify `ret` and `key_exist` to just one output value.
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#discussion_r1562285186
##########
src/commands/cmd_key.cc:
##########
@@ -363,20 +361,80 @@ class CommandRenameNX : public Commander {
public:
Status Execute(Server *srv, Connection *conn, std::string *output) override {
redis::Database redis(srv->storage, conn->GetNamespace());
- bool ret = true;
- bool key_exist = true;
+ Database::CopyResult res = Database::CopyResult::DONE;
std::string ns_key = redis.AppendNamespacePrefix(args_[1]);
std::string new_ns_key = redis.AppendNamespacePrefix(args_[2]);
- auto s = redis.Move(ns_key, new_ns_key, true, &ret, &key_exist);
+ auto s = redis.Copy(ns_key, new_ns_key, true, true, &res);
if (!s.ok()) return {Status::RedisExecErr, s.ToString()};
- if (!key_exist) return {Status::RedisExecErr, rocksdb::Status::InvalidArgument("ERR no such key").ToString()};
- if (ret) {
- *output = redis::Integer(1);
- } else {
- *output = redis::Integer(0);
+ switch (res) {
+ case Database::CopyResult::KEY_NOT_EXIST:
+ return {Status::RedisExecErr, rocksdb::Status::InvalidArgument("ERR no such key").ToString()};
+ case Database::CopyResult::DONE:
+ *output = redis::Integer(1);
+ break;
+ case Database::CopyResult::KEY_ALREADY_EXIST:
+ *output = redis::Integer(0);
+ break;
+ }
+ return Status::OK();
+ }
+};
+
+class CommandCopy : public Commander {
+ public:
+ Status Parse(const std::vector<std::string> &args) override {
+ if (args.size() > 6) {
+ return {Status::RedisParseErr, errWrongNumOfArguments};
+ }
+ if (args.size() == 4) {
+ if (util::ToLower(args[3]) == "replace") {
+ replace_ = true;
+ } else {
+ return {Status::RedisParseErr, errInvalidSyntax};
+ }
+ } else if (args.size() >= 5) {
+ if (util::ToLower(args[3]) != "db") {
+ return {Status::RedisParseErr, errInvalidSyntax};
+ }
+ auto db_num = ParseInt<int64_t>(args[4], 10);
+ // There's only one database in Kvrocks, so the DB must be 0 here.
+ if (!db_num.IsOK() || db_num.GetValue() != 0) {
+ return {Status::RedisParseErr, errInvalidSyntax};
+ }
+ if (args.size() == 6) {
+ if (util::ToLower(args[5]) == "replace") {
+ replace_ = true;
+ } else {
+ return {Status::RedisParseErr, errInvalidSyntax};
+ }
+ }
Review Comment:
Please rewrite via `CommandParser`.
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#issuecomment-2051378639
## [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=2238) **Quality Gate passed**
Issues
 [4 New issues](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=2238&resolved=false&inNewCodePeriod=true)
 [0 Accepted issues](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=2238&metric=new_accepted_issues&view=list)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=2238&resolved=false&inNewCodePeriod=true)
 [51.1% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=2238&metric=new_coverage&view=list)
 [1.2% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=2238&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=2238)
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#discussion_r1562286362
##########
src/commands/cmd_key.cc:
##########
@@ -363,20 +361,80 @@ class CommandRenameNX : public Commander {
public:
Status Execute(Server *srv, Connection *conn, std::string *output) override {
redis::Database redis(srv->storage, conn->GetNamespace());
- bool ret = true;
- bool key_exist = true;
+ Database::CopyResult res = Database::CopyResult::DONE;
std::string ns_key = redis.AppendNamespacePrefix(args_[1]);
std::string new_ns_key = redis.AppendNamespacePrefix(args_[2]);
- auto s = redis.Move(ns_key, new_ns_key, true, &ret, &key_exist);
+ auto s = redis.Copy(ns_key, new_ns_key, true, true, &res);
if (!s.ok()) return {Status::RedisExecErr, s.ToString()};
- if (!key_exist) return {Status::RedisExecErr, rocksdb::Status::InvalidArgument("ERR no such key").ToString()};
- if (ret) {
- *output = redis::Integer(1);
- } else {
- *output = redis::Integer(0);
+ switch (res) {
+ case Database::CopyResult::KEY_NOT_EXIST:
+ return {Status::RedisExecErr, rocksdb::Status::InvalidArgument("ERR no such key").ToString()};
+ case Database::CopyResult::DONE:
+ *output = redis::Integer(1);
+ break;
+ case Database::CopyResult::KEY_ALREADY_EXIST:
+ *output = redis::Integer(0);
+ break;
+ }
+ return Status::OK();
+ }
+};
+
+class CommandCopy : public Commander {
+ public:
+ Status Parse(const std::vector<std::string> &args) override {
+ if (args.size() > 6) {
+ return {Status::RedisParseErr, errWrongNumOfArguments};
+ }
+ if (args.size() == 4) {
Review Comment:
Also, we don't need to have a `COPYX`, we can just extend this command by `COPY ... NAMESPACE xx`.
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "Chiro11 (via GitHub)" <gi...@apache.org>.
Chiro11 commented on code in PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#discussion_r1562081120
##########
src/commands/cmd_key.cc:
##########
@@ -222,7 +221,7 @@ class CommandExpireAt : public Commander {
timestamp_ = *parse_result;
- return Commander::Parse(args);
+ return Status::OK();
Review Comment:
Just to unify. Because the other functions in this file are written like this.
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#issuecomment-2051290508
@Chiro11 Yes, it's unrelated to this PR and there's no worry about it. It seems a bug inside the llvm compiler: https://github.com/apache/kvrocks/actions/runs/8657998616/job/23741619462?pr=2238#step:11:1632
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on code in PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#discussion_r1562251590
##########
src/commands/cmd_key.cc:
##########
@@ -363,20 +361,80 @@ class CommandRenameNX : public Commander {
public:
Status Execute(Server *srv, Connection *conn, std::string *output) override {
redis::Database redis(srv->storage, conn->GetNamespace());
- bool ret = true;
- bool key_exist = true;
+ Database::CopyResult res = Database::CopyResult::DONE;
std::string ns_key = redis.AppendNamespacePrefix(args_[1]);
std::string new_ns_key = redis.AppendNamespacePrefix(args_[2]);
- auto s = redis.Move(ns_key, new_ns_key, true, &ret, &key_exist);
+ auto s = redis.Copy(ns_key, new_ns_key, true, true, &res);
if (!s.ok()) return {Status::RedisExecErr, s.ToString()};
- if (!key_exist) return {Status::RedisExecErr, rocksdb::Status::InvalidArgument("ERR no such key").ToString()};
- if (ret) {
- *output = redis::Integer(1);
- } else {
- *output = redis::Integer(0);
+ switch (res) {
+ case Database::CopyResult::KEY_NOT_EXIST:
+ return {Status::RedisExecErr, rocksdb::Status::InvalidArgument("ERR no such key").ToString()};
+ case Database::CopyResult::DONE:
+ *output = redis::Integer(1);
+ break;
+ case Database::CopyResult::KEY_ALREADY_EXIST:
+ *output = redis::Integer(0);
+ break;
+ }
+ return Status::OK();
+ }
+};
+
+class CommandCopy : public Commander {
+ public:
+ Status Parse(const std::vector<std::string> &args) override {
+ if (args.size() > 6) {
+ return {Status::RedisParseErr, errWrongNumOfArguments};
+ }
+ if (args.size() == 4) {
Review Comment:
From the Redis documentation: https://redis.io/docs/latest/commands/copy/, it doesn't require the DB to be placed before REPLACE. That said: `COPY k0 k1 REPLACE DB 0` is also good for Redis, you can implement the parameter parser via `CommandParser`.
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#discussion_r1562284630
##########
src/commands/cmd_key.cc:
##########
@@ -346,14 +345,13 @@ class CommandRename : public Commander {
public:
Status Execute(Server *srv, Connection *conn, std::string *output) override {
redis::Database redis(srv->storage, conn->GetNamespace());
- bool ret = true;
- bool key_exist = true;
+ Database::CopyResult res = Database::CopyResult::DONE;
std::string ns_key = redis.AppendNamespacePrefix(args_[1]);
std::string new_ns_key = redis.AppendNamespacePrefix(args_[2]);
- auto s = redis.Move(ns_key, new_ns_key, false, &ret, &key_exist);
+ auto s = redis.Copy(ns_key, new_ns_key, false, true, &res);
if (!s.ok()) return {Status::RedisExecErr, s.ToString()};
- if (!key_exist) return {Status::RedisExecErr, rocksdb::Status::InvalidArgument("ERR no such key").ToString()};
-
+ if (res == Database::CopyResult::KEY_NOT_EXIST)
+ return {Status::RedisExecErr, rocksdb::Status::InvalidArgument("ERR no such key").ToString()};
Review Comment:
```suggestion
return {Status::RedisExecErr, "no such key"};
```
rocksdb::Status is meaningless here..
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "Chiro11 (via GitHub)" <gi...@apache.org>.
Chiro11 commented on PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#issuecomment-2051510667
> Looks good to me now.
>
> > Also, we don't need to have a COPYX, we can just extend this command by COPY ... NAMESPACE xx.
>
> BTW do you want to implement it in this PR?
I prefer put it in another PR. It also need tests, make this PR too huge.
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on code in PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#discussion_r1562053804
##########
src/commands/cmd_key.cc:
##########
@@ -222,7 +221,7 @@ class CommandExpireAt : public Commander {
timestamp_ = *parse_result;
- return Commander::Parse(args);
+ return Status::OK();
Review Comment:
Why do we change this line?
##########
src/commands/cmd_key.cc:
##########
@@ -363,20 +361,80 @@ class CommandRenameNX : public Commander {
public:
Status Execute(Server *srv, Connection *conn, std::string *output) override {
redis::Database redis(srv->storage, conn->GetNamespace());
- bool ret = true;
- bool key_exist = true;
+ Database::CopyResult res = Database::CopyResult::DONE;
std::string ns_key = redis.AppendNamespacePrefix(args_[1]);
std::string new_ns_key = redis.AppendNamespacePrefix(args_[2]);
- auto s = redis.Move(ns_key, new_ns_key, true, &ret, &key_exist);
+ auto s = redis.Copy(ns_key, new_ns_key, true, true, &res);
if (!s.ok()) return {Status::RedisExecErr, s.ToString()};
- if (!key_exist) return {Status::RedisExecErr, rocksdb::Status::InvalidArgument("ERR no such key").ToString()};
- if (ret) {
- *output = redis::Integer(1);
- } else {
- *output = redis::Integer(0);
+ switch (res) {
+ case Database::CopyResult::KEY_NOT_EXIST:
+ return {Status::RedisExecErr, rocksdb::Status::InvalidArgument("ERR no such key").ToString()};
+ case Database::CopyResult::DONE:
+ *output = redis::Integer(1);
+ break;
+ case Database::CopyResult::KEY_ALREADY_EXIST:
+ *output = redis::Integer(0);
+ break;
+ }
+ return Status::OK();
+ }
+};
+
+class CommandCopy : public Commander {
+ public:
+ Status Parse(const std::vector<std::string> &args) override {
+ if (args.size() > 6) {
+ return {Status::RedisParseErr, errWrongNumOfArguments};
+ }
+ if (args.size() == 4) {
+ if (util::ToLower(args[3]) == "replace") {
+ replace_ = true;
+ } else {
+ return {Status::RedisParseErr, errInvalidSyntax};
+ }
+ } else if (args.size() >= 5) {
+ if (util::ToLower(args[3]) != "db") {
+ return {Status::RedisParseErr, errInvalidSyntax};
+ }
+ auto db_num = ParseInt<int64_t>(args[4], 10);
+ // DB num should only be 1, just a placeholder
Review Comment:
```suggestion
// There's only one database in Kvrocks, so the DB must be 0 here.
```
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk merged PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#issuecomment-2051330520
@Chiro11 This PR is generally looks good for me and one comment inline. Thanks for your careful code coverage for this command, that's cool.
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "Chiro11 (via GitHub)" <gi...@apache.org>.
Chiro11 commented on code in PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#discussion_r1561068828
##########
src/storage/redis_db.cc:
##########
@@ -708,7 +708,7 @@ rocksdb::Status Database::typeInternal(const Slice &key, RedisType *type) {
return rocksdb::Status::OK();
}
-rocksdb::Status Database::Move(const std::string &key, const std::string &new_key, bool nx, bool *ret,
+rocksdb::Status Database::Move(const std::string &key, const std::string &new_key, bool nx, bool delete_old, bool *ret,
bool *key_exist) {
Review Comment:
How to do it, use int?
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#issuecomment-2051617182
## [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=2238) **Quality Gate passed**
Issues
 [4 New issues](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=2238&resolved=false&inNewCodePeriod=true)
 [0 Accepted issues](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=2238&metric=new_accepted_issues&view=list)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=2238&resolved=false&inNewCodePeriod=true)
 [52.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=2238&metric=new_coverage&view=list)
 [0.5% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=2238&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=2238)
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#discussion_r1561062160
##########
src/storage/redis_db.cc:
##########
@@ -708,7 +708,7 @@ rocksdb::Status Database::typeInternal(const Slice &key, RedisType *type) {
return rocksdb::Status::OK();
}
-rocksdb::Status Database::Move(const std::string &key, const std::string &new_key, bool nx, bool *ret,
+rocksdb::Status Database::Move(const std::string &key, const std::string &new_key, bool nx, bool delete_old, bool *ret,
Review Comment:
We can rename it to `Copy`.
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "Chiro11 (via GitHub)" <gi...@apache.org>.
Chiro11 commented on PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#issuecomment-2050909353
> I found sonar cloud tells us "Rename function "TestCopy_Error" to match the regular expression ^(_|[a-zA-Z0-9]+)$". Can you change those go test case function names to pascal Case (eg: `TestCopyError`)?
>
> https://sonarcloud.io/project/issues?resolved=false&pullRequest=2238&id=apache_kvrocks&open=AY7N7bb-6GZZ34cBM2MJ
OK. I will also change the function name in rename_test.go by the way.
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on code in PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#discussion_r1562088627
##########
src/commands/cmd_key.cc:
##########
@@ -222,7 +221,7 @@ class CommandExpireAt : public Commander {
timestamp_ = *parse_result;
- return Commander::Parse(args);
+ return Status::OK();
Review Comment:
ok, that makes sense since it does nothing inside the parent's Parse().
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "Chiro11 (via GitHub)" <gi...@apache.org>.
Chiro11 commented on PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#issuecomment-2051241222
@git-hulk One ci test failed. Did it happen occasionally or something wrong?
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#discussion_r1561080608
##########
src/storage/redis_db.cc:
##########
@@ -708,7 +708,7 @@ rocksdb::Status Database::typeInternal(const Slice &key, RedisType *type) {
return rocksdb::Status::OK();
}
-rocksdb::Status Database::Move(const std::string &key, const std::string &new_key, bool nx, bool *ret,
+rocksdb::Status Database::Move(const std::string &key, const std::string &new_key, bool nx, bool delete_old, bool *ret,
bool *key_exist) {
Review Comment:
```
enum { KEY_NOT_EXIST, KEY_ALREADY_EXIST, DONE }
```
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add support of the command COPY [kvrocks]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #2238:
URL: https://github.com/apache/kvrocks/pull/2238#issuecomment-2050046508
## [](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=2238) **Quality Gate passed**
Issues
 [15 New issues](https://sonarcloud.io/project/issues?id=apache_kvrocks&pullRequest=2238&resolved=false&inNewCodePeriod=true)
 [0 Accepted issues](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=2238&metric=new_accepted_issues&view=list)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kvrocks&pullRequest=2238&resolved=false&inNewCodePeriod=true)
 [51.1% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=2238&metric=new_coverage&view=list)
 [1.2% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_kvrocks&pullRequest=2238&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_kvrocks&pullRequest=2238)
--
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: issues-unsubscribe@kvrocks.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org