Skip to content

Commit

Permalink
bpop from sort and rename cmd but rename has some bug
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelSze1 committed Aug 17, 2024
1 parent 64fc4de commit 645829e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cmd_admin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ void SortCmd::DoCmd(PClient* client) {
storage::Status s = PSTORE.GetBackend(client->GetCurrentDB())->GetStorage()->RPush(store_key_, ret_, &reply_num);
if (s.ok()) {
client->AppendInteger(reply_num);
client->SetKey(store_key_);
ServeAndUnblockConns(client);
} else {
client->SetRes(CmdRes::kErrOther, s.ToString());
}
Expand Down
2 changes: 2 additions & 0 deletions src/cmd_keys.cc
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ void RenameCmd::DoCmd(PClient* client) {
storage::Status s = PSTORE.GetBackend(client->GetCurrentDB())->GetStorage()->Rename(client->Key(), client->argv_[2]);
if (s.ok()) {
client->SetRes(CmdRes::kOK);
client->SetKey(client->argv_[2]);
ServeAndUnblockConns(client);
} else if (s.IsNotFound()) {
client->SetRes(CmdRes::kNotFound, s.ToString());
} else {
Expand Down

0 comments on commit 645829e

Please sign in to comment.