Skip to content

Commit

Permalink
optimize log
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Jul 27, 2018
1 parent 65c0218 commit 570ea00
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions src/redis_protocol/proxy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ set(MY_BINPLACES "config.ini")

set(MY_BOOST_PACKAGES system filesystem)

# Avoid megabytes of warnings like:
# rdsn/thirdparty/output/include/s2/s1angle.h:288:28: error:
# optimization attribute on ‘double sin(S1Angle)’ follows
# definition but the attribute doesn’t match [-Werror=attributes]
add_definitions(-Wno-attributes)

dsn_add_executable()
18 changes: 9 additions & 9 deletions src/redis_protocol/proxy_lib/redis_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1006,19 +1006,19 @@ void redis_parser::counter_internal(message_entry &entry)
auto on_incr_reply = [ref_this, this, command, &entry](
::dsn::error_code ec, dsn_message_t, dsn_message_t response) {
if (is_session_reset.load(std::memory_order_acquire)) {
ddebug_f("{}: command {} seqid({}) got reply, but session has reset",
remote_address.to_string(),
command,
entry.sequence_id);
dwarn_f("{}: command {} seqid({}) got reply, but session has reset",
remote_address.to_string(),
command,
entry.sequence_id);
return;
}

if (::dsn::ERR_OK != ec) {
ddebug_f("{}: command {} seqid({}) got reply with error = {}",
remote_address.to_string(),
command,
entry.sequence_id,
ec.to_string());
dwarn_f("{}: command {} seqid({}) got reply with error = {}",
remote_address.to_string(),
command,
entry.sequence_id,
ec.to_string());
redis_simple_string result;
result.is_error = true;
result.message = std::string("ERR ") + ec.to_string();
Expand Down

0 comments on commit 570ea00

Please sign in to comment.