From a5bebd44086cd2d956ca774c1524995a336a596f Mon Sep 17 00:00:00 2001 From: fangfengbin <869218239a@zju.edu.cn> Date: Wed, 10 Jun 2020 10:53:53 +0800 Subject: [PATCH] Fix create actor rpc reconnect bug (#8855) --- python/ray/tests/test_gcs_fault_tolerance.py | 6 ------ src/ray/rpc/gcs_server/gcs_rpc_client.h | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/python/ray/tests/test_gcs_fault_tolerance.py b/python/ray/tests/test_gcs_fault_tolerance.py index c8e1eb64d..44808d65a 100644 --- a/python/ray/tests/test_gcs_fault_tolerance.py +++ b/python/ray/tests/test_gcs_fault_tolerance.py @@ -1,5 +1,4 @@ import sys -import time import ray @@ -23,11 +22,6 @@ def test_gcs_server_restart(): ray.worker._global_node.kill_gcs_server() ray.worker._global_node.start_gcs_server() - # TODO(ffbin): After gcs server restarts, if an RPC request is sent to - # gcs server immediately, gcs server cannot receive the request, - # but the request will return success. We will fix this in the next pr. - time.sleep(1) - result = ray.get(actor1.method.remote(7)) assert result == 9 diff --git a/src/ray/rpc/gcs_server/gcs_rpc_client.h b/src/ray/rpc/gcs_server/gcs_rpc_client.h index 538f64f86..7720d9bc5 100644 --- a/src/ray/rpc/gcs_server/gcs_rpc_client.h +++ b/src/ray/rpc/gcs_server/gcs_rpc_client.h @@ -105,7 +105,7 @@ class GcsRpcClient { VOID_GCS_RPC_CLIENT_METHOD(JobInfoGcsService, GetAllJobInfo, job_info_grpc_client_, ) /// Create actor via GCS Service. - VOID_RPC_CLIENT_METHOD(ActorInfoGcsService, CreateActor, actor_info_grpc_client_, ) + VOID_GCS_RPC_CLIENT_METHOD(ActorInfoGcsService, CreateActor, actor_info_grpc_client_, ) /// Get actor data from GCS Service. VOID_GCS_RPC_CLIENT_METHOD(ActorInfoGcsService, GetActorInfo, actor_info_grpc_client_, )