Skip to content

Commit

Permalink
Merge pull request OpenAtomFoundation#44 from bigpyer/master
Browse files Browse the repository at this point in the history
fix redis compatibility of kv strlen
  • Loading branch information
KernelMaker authored Nov 30, 2016
2 parents d489183 + 31beb40 commit d1095c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pika_kv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ void StrlenCmd::DoInitial(PikaCmdArgsType &argv, const CmdInfo* const ptr_info)
void StrlenCmd::Do() {
int64_t len = 0;
nemo::Status s = g_pika_server->db()->Strlen(key_, &len);
if (s.ok()) {
if (s.ok() || s.IsNotFound()) {
res_.AppendInteger(len);
} else {
res_.SetRes(CmdRes::kErrOther, s.ToString());
Expand Down

0 comments on commit d1095c4

Please sign in to comment.