Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix too many warning log when restarting #218

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Service/ConnectionHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ void ConnectionHandler::updateStats(const Coordination::ZooKeeperResponsePtr & r
if (unlikely(elapsed > 10000))
LOG_WARNING(
log,
"The processing time for request #{}#{}#{} is {}ms, which is a little long, please take care.",
"Slow request detected #{}#{}#{}, time costs {}ms, please take care.",
toHexString(session_id.load()),
response->xid,
Coordination::toString(response->getOpNum()),
Expand Down
12 changes: 0 additions & 12 deletions src/Service/NuRaftStateMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,18 +311,6 @@ nuraft::ptr<nuraft::buffer> NuRaftStateMachine::commit(const ulong log_idx, nura

LOG_TRACE(log, "Commit log index {} fore request {}", log_idx, request_for_session.toSimpleString());

if (request_for_session.create_time > 0)
{
Int64 elapsed = Poco::Timestamp().epochMicroseconds() / 1000 - request_for_session.create_time;
if (unlikely(elapsed > 10000))
LOG_WARNING(
log,
"When committing log {} for request {}, the time has passed {}ms, which is a little long, please take care.",
log_idx,
request_for_session.toSimpleString(),
elapsed);
}

if (request_processor)
request_processor->commit(request_for_session);
else
Expand Down
Loading