Skip to content

Commit

Permalink
Fix logs error tense
Browse files Browse the repository at this point in the history
  • Loading branch information
lzydmxy authored and JackyWoo committed Dec 24, 2024
1 parent 0c84f91 commit 11082d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/Service/ConnectionHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,8 +650,9 @@ void ConnectionHandler::sendSessionResponseToClient(const Coordination::ZooKeepe

void ConnectionHandler::pushUserResponseToSendingQueue(const Coordination::ZooKeeperResponsePtr & response)
{
LOG_DEBUG(log, "Push a response #{}#{}#{} error {} to IO sending queue.",
toHexString(session_id.load()), response->xid, Coordination::toString(response->getOpNum()), errorMessage(response->error));
LOG_DEBUG(log, "Push response #{}#{}#{} with error '{}' to IO sending queue.", toHexString(session_id.load()),
response->xid, Coordination::toString(response->getOpNum()), errorMessage(response->error));

updateStats(response);

/// Lock to avoid data condition which will lead response leak
Expand Down
8 changes: 4 additions & 4 deletions src/Service/ForwardConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void ForwardConnection::connect()
{
try
{
LOG_INFO(log, "Try connect forward server {}", endpoint);
LOG_INFO(log, "Try connecting forward server {}", endpoint);

/// Reset the state of previous attempt.
socket = Poco::Net::StreamSocket();
Expand All @@ -45,7 +45,7 @@ void ForwardConnection::connect()
throw Exception(ErrorCodes::RAFT_FORWARD_ERROR, "Handshake with {} failed", endpoint);

connected = true;
LOG_INFO(log, "Connect to forward server success, peerAddress: {} localAddress: {}.", socket.peerAddress().toString(), socket.address().toString());
LOG_INFO(log, "Connected to forward server success, peer address {}, local address {}", socket.peerAddress().toString(), socket.address().toString());
break;
}
catch (...)
Expand All @@ -71,7 +71,7 @@ void ForwardConnection::disconnect()

void ForwardConnection::send(ForwardRequestPtr request)
{
LOG_DEBUG(log, "Forward request {} to leader {}", request->toString(), endpoint);
LOG_DEBUG(log, "Forwarding request {} to leader {}", request->toString(), endpoint);

if (unlikely(!connected))
connect();
Expand Down Expand Up @@ -127,7 +127,7 @@ void ForwardConnection::receive(ForwardResponsePtr & response)
}

response->readImpl(*in);
LOG_DEBUG(log, "Receive forward response {} from {} done", response->toString(), endpoint);
LOG_DEBUG(log, "Received forward response {} from {} done", response->toString(), endpoint);
}
catch (Exception & e)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Service/ForwardConnectionHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void ForwardConnectionHandler::processUserOrSessionRequest(ForwardRequestPtr req
{
ReadBufferFromMemory body(req_body_buf->begin(), req_body_buf->used());
request->readImpl(body);
LOG_DEBUG(log, "Receive forward request {} from server {} client {}", request->toString(), server_id, client_id);
LOG_DEBUG(log, "Received forward request {} from server {} client {}", request->toString(), server_id, client_id);
keeper_dispatcher->pushForwardRequest(server_id, client_id, request);
}

Expand Down

0 comments on commit 11082d3

Please sign in to comment.