Browse Source

Modify log level

tags/v1.2.0-rc1
chendongsheng 4 years ago
parent
commit
0b83f0f18b
3 changed files with 9 additions and 9 deletions
  1. +5
    -5
      mindspore/ccsrc/ps/core/abstract_node.cc
  2. +2
    -2
      mindspore/ccsrc/ps/core/tcp_client.cc
  3. +2
    -2
      mindspore/ccsrc/ps/core/tcp_server.cc

+ 5
- 5
mindspore/ccsrc/ps/core/abstract_node.cc View File

@@ -279,11 +279,11 @@ void AbstractNode::StartHeartbeatTimer(const std::shared_ptr<TcpClient> &client)
heart_beat_thread_ = std::make_unique<std::thread>([&]() { heart_beat_thread_ = std::make_unique<std::thread>([&]() {
while (!is_finish_.load()) { while (!is_finish_.load()) {
if (!Heartbeat(client)) { if (!Heartbeat(client)) {
MS_LOG(ERROR) << "The node role is:" << CommUtil::NodeRoleToString(node_info_.node_role_)
<< ", the node id is:" << node_info_.node_id_ << " Send heartbeat timeout!";
MS_LOG(WARNING) << "The node role is:" << CommUtil::NodeRoleToString(node_info_.node_role_)
<< ", the node id is:" << node_info_.node_id_ << " Send heartbeat timeout!";
if (!CheckSchedulerTimeout() && on_node_event_message_) { if (!CheckSchedulerTimeout() && on_node_event_message_) {
MS_LOG(ERROR) << "The node role is:" << CommUtil::NodeRoleToString(node_info_.node_role_)
<< ", the node id is:" << node_info_.node_id_ << " exited due to scheduler timeout!";
MS_LOG(WARNING) << "The node role is:" << CommUtil::NodeRoleToString(node_info_.node_role_)
<< ", the node id is:" << node_info_.node_id_ << " exited due to scheduler timeout!";
is_finish_ = true; is_finish_ = true;
wait_finish_cond_.notify_all(); wait_finish_cond_.notify_all();
on_node_event_message_(NodeEvent::SCHEDULER_TIMEOUT); on_node_event_message_(NodeEvent::SCHEDULER_TIMEOUT);
@@ -306,7 +306,7 @@ bool AbstractNode::Heartbeat(const std::shared_ptr<TcpClient> &client, bool is_n


if (!SendMessageSync(client, meta, Protos::PROTOBUF, heartbeat_message.SerializeAsString().data(), if (!SendMessageSync(client, meta, Protos::PROTOBUF, heartbeat_message.SerializeAsString().data(),
heartbeat_message.ByteSizeLong())) { heartbeat_message.ByteSizeLong())) {
MS_LOG(ERROR) << "The node id:" << node_info_.node_id_ << " Send heartbeat timeout!";
MS_LOG(WARNING) << "The node id:" << node_info_.node_id_ << " Send heartbeat timeout!";
} }
return true; return true;
} }


+ 2
- 2
mindspore/ccsrc/ps/core/tcp_client.cc View File

@@ -220,12 +220,12 @@ void TcpClient::EventCallback(struct bufferevent *bev, std::int16_t events, void
SetTcpNoDelay(fd); SetTcpNoDelay(fd);
MS_LOG(INFO) << "Client connected!"; MS_LOG(INFO) << "Client connected!";
} else if (events & BEV_EVENT_ERROR) { } else if (events & BEV_EVENT_ERROR) {
MS_LOG(ERROR) << "Client connected error!";
MS_LOG(WARNING) << "Client connected BEV_EVENT_ERROR!";
if (tcp_client->disconnected_callback_) { if (tcp_client->disconnected_callback_) {
tcp_client->disconnected_callback_(); tcp_client->disconnected_callback_();
} }
} else if (events & BEV_EVENT_EOF) { } else if (events & BEV_EVENT_EOF) {
MS_LOG(ERROR) << "Client connected end of file";
MS_LOG(WARNING) << "Client connected end of file";
} }
} }




+ 2
- 2
mindspore/ccsrc/ps/core/tcp_server.cc View File

@@ -375,7 +375,7 @@ void TcpServer::EventCallback(struct bufferevent *bev, std::int16_t events, void
srv->RemoveConnection(conn->GetFd()); srv->RemoveConnection(conn->GetFd());
bufferevent_free(bev); bufferevent_free(bev);
} else if (events & BEV_EVENT_ERROR) { } else if (events & BEV_EVENT_ERROR) {
MS_LOG(ERROR) << "Event buffer remain data: " << remain;
MS_LOG(WARNING) << "Event buffer remain data: " << remain;
// Free connection structures // Free connection structures
srv->RemoveConnection(conn->GetFd()); srv->RemoveConnection(conn->GetFd());
bufferevent_free(bev); bufferevent_free(bev);
@@ -385,7 +385,7 @@ void TcpServer::EventCallback(struct bufferevent *bev, std::int16_t events, void
srv->client_disconnection_(*srv, *conn); srv->client_disconnection_(*srv, *conn);
} }
} else { } else {
MS_LOG(ERROR) << "Unhandled event!";
MS_LOG(WARNING) << "Unhandled event!";
} }
} }




Loading…
Cancel
Save