diff --git a/paddle/fluid/operators/detail/grpc_server.cc b/paddle/fluid/operators/detail/grpc_server.cc index 5adb516292331cda34b1205ebdc0096f78c6c587..9a8c4196720d0054eeaa25d7e54a38b9691b4c2e 100644 --- a/paddle/fluid/operators/detail/grpc_server.cc +++ b/paddle/fluid/operators/detail/grpc_server.cc @@ -255,9 +255,9 @@ void AsyncGRPCServer::StartServer() { reqs.reserve(kRequestBufSize); - LOG(INFO) << "TryToRegisterNewOne on RPC NAME: " << rpc_name << " I: " << i; - for (int i = 0; i < kRequestBufSize; i++) { + LOG(INFO) << "TryToRegisterNewOne on RPC NAME: " << rpc_name + << " I: " << i; TryToRegisterNewOne(rpc_name, i); } @@ -313,9 +313,6 @@ void AsyncGRPCServer::TryToRegisterNewOne(const std::string& rpc_name, LOG(INFO) << "TryToRegisterNewOne on RPC NAME: " << rpc_name << " REQ ID: " << req_id; - // VLOG(4) << "register send rpc_name:" << rpc_name - // << ", handler:" << rpc_call_map_[kRequestSend]; - auto& reqs = rpc_reqs_[rpc_name]; auto& handler = rpc_call_map_[rpc_name]; auto& cq = rpc_cq_[rpc_name]; @@ -328,7 +325,6 @@ void AsyncGRPCServer::TryToRegisterNewOne(const std::string& rpc_name, } else if (rpc_name == kRequestPrefetch) { b = new RequestPrefetch(&service_, cq.get(), handler, req_id); } else if (rpc_name == kRequestCheckpoint) { - LOG(INFO) << "TryToRegisterNewOne on RPC kRequestCheckpoint"; b = new RequestCheckpointNotify(&service_, cq.get(), handler, req_id); } else { PADDLE_ENFORCE(false, "not supported rpc"); diff --git a/paddle/fluid/operators/detail/grpc_service.h b/paddle/fluid/operators/detail/grpc_service.h index 69200a01d3c8c9c02ac0126a8fc8341719a94535..cb745e125a9a5a6755dd98d46ee7aa6ed16da2ea 100644 --- a/paddle/fluid/operators/detail/grpc_service.h +++ b/paddle/fluid/operators/detail/grpc_service.h @@ -83,7 +83,7 @@ enum class GrpcMethod { }; static const int kGrpcNumMethods = - static_cast(GrpcMethod::kPrefetchVariable) + 1; + static_cast(GrpcMethod::kCheckpointNotify) + 1; inline const char* GrpcMethodName(GrpcMethod id) { switch (id) {