Skip to content

Commit

Permalink
fix: command CONFIG SET * reply array length error(#2320) (#2336)
Browse files Browse the repository at this point in the history
* fix

* change ConfigCmd::ConfigSet return way

* func ConfigCmd::ConfigSet use res_ to get return value
  • Loading branch information
578223592 authored Jan 21, 2024
1 parent 39fc96e commit ce938d5
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 138 deletions.
2 changes: 1 addition & 1 deletion include/pika_admin.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ class ConfigCmd : public Cmd {
std::vector<std::string> config_args_v_;
void DoInitial() override;
void ConfigGet(std::string& ret);
void ConfigSet(std::string& ret, std::shared_ptr<DB> db);
void ConfigSet(std::shared_ptr<DB> db);
void ConfigRewrite(std::string& ret);
void ConfigResetstat(std::string& ret);
void ConfigRewriteReplicationID(std::string& ret);
Expand Down
2 changes: 1 addition & 1 deletion include/pika_command.h
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ class CmdRes {

void AppendStringVector(const std::vector<std::string>& strArray) {
if (strArray.empty()) {
AppendArrayLen(-1);
AppendArrayLen(0);
return;
}
AppendArrayLen(strArray.size());
Expand Down
Loading

0 comments on commit ce938d5

Please sign in to comment.