diff --git a/mindspore/ccsrc/ps/core/abstract_node.cc b/mindspore/ccsrc/ps/core/abstract_node.cc index 70862c71431..03059b9ba99 100644 --- a/mindspore/ccsrc/ps/core/abstract_node.cc +++ b/mindspore/ccsrc/ps/core/abstract_node.cc @@ -475,7 +475,9 @@ void AbstractNode::ProcessSendMetadata(std::shared_ptr conn, std: send_meta_message.ParseFromArray(data, size); worker_num_ = send_meta_message.worker_num(); server_num_ = send_meta_message.server_num(); - MS_LOG(WARNING) << "The send metadata worker num:" << worker_num_ << ", server num:" << server_num_; + current_cluster_state_ = send_meta_message.cluster_state(); + MS_LOG(INFO) << "The send metadata worker num:" << worker_num_ << ", server num:" << server_num_ + << ", cluster state is:" << current_cluster_state_; nodes_address_.clear(); for (const auto &it : send_meta_message.servers_meta()) { diff --git a/mindspore/ccsrc/ps/core/protos/comm.proto b/mindspore/ccsrc/ps/core/protos/comm.proto index 6fb72bf4942..86cfa1a15da 100644 --- a/mindspore/ccsrc/ps/core/protos/comm.proto +++ b/mindspore/ccsrc/ps/core/protos/comm.proto @@ -119,6 +119,8 @@ message SendMetadataMessage { int32 worker_num = 2; // the current server number. int32 server_num = 3; + // the current cluster state. + ClusterState cluster_state = 4; } message FinishMessage { diff --git a/mindspore/ccsrc/ps/core/scheduler_node.cc b/mindspore/ccsrc/ps/core/scheduler_node.cc index 690fb982ca3..61acd28cf38 100644 --- a/mindspore/ccsrc/ps/core/scheduler_node.cc +++ b/mindspore/ccsrc/ps/core/scheduler_node.cc @@ -239,6 +239,7 @@ void SchedulerNode::SendMetadata(const std::shared_ptr &client) { std::vector servers_meta_list = node_manager_.FetchServersMeta(); send_metadata_message.set_worker_num(node_manager_.worker_num()); send_metadata_message.set_server_num(node_manager_.server_num()); + send_metadata_message.set_cluster_state(node_manager_.GetClusterState()); *send_metadata_message.mutable_servers_meta() = {servers_meta_list.begin(), servers_meta_list.end()};