Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoliwei committed Mar 5, 2020
1 parent 9757495 commit decd4e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/redis_protocol/proxy_lib/redis_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,9 +681,11 @@ void redis_parser::del_internal(message_entry &entry)
simple_error_reply(entry,
"internal error " + std::to_string(rrdb_response.error));
} else {
// NOTE: Deleting a non-existed key returns 1 too. But standard Redis returns 0. Pegasus behaves
// NOTE: Deleting a non-existed key returns 1 too. But standard Redis returns 0.
// Pegasus behaves
// differently in this case intentionally for performance.
// Because if we need to check the existence, we should use check_and_mutate instead.
// Because if we need to check the existence, we should use check_and_mutate
// instead.
simple_integer_reply(entry, 1);
}
}
Expand Down

0 comments on commit decd4e8

Please sign in to comment.