mirror of
https://github.com/wassname/ray.git
synced 2026-08-12 12:20:11 +08:00
Fix TwoNodeTest.TestActorTaskCrossNodes testcase when enable gcs service (#7416)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "ray/core_worker/context.h"
|
||||
#include "ray/core_worker/transport/direct_actor_transport.h"
|
||||
#include "ray/core_worker/transport/raylet_transport.h"
|
||||
#include "ray/gcs/gcs_client/service_based_gcs_client.h"
|
||||
#include "ray/util/util.h"
|
||||
|
||||
namespace {
|
||||
@@ -99,7 +100,11 @@ CoreWorker::CoreWorker(const WorkerType worker_type, const Language language,
|
||||
}
|
||||
RAY_LOG(INFO) << "Initializing worker " << worker_context_.GetWorkerID();
|
||||
// Initialize gcs client.
|
||||
gcs_client_ = std::make_shared<gcs::RedisGcsClient>(gcs_options);
|
||||
if (getenv("RAY_GCS_SERVICE_ENABLED") != nullptr) {
|
||||
gcs_client_ = std::make_shared<ray::gcs::ServiceBasedGcsClient>(gcs_options);
|
||||
} else {
|
||||
gcs_client_ = std::make_shared<ray::gcs::RedisGcsClient>(gcs_options);
|
||||
}
|
||||
RAY_CHECK_OK(gcs_client_->Connect(io_service_));
|
||||
|
||||
actor_manager_ = std::unique_ptr<ActorManager>(new ActorManager(gcs_client_->Actors()));
|
||||
|
||||
Reference in New Issue
Block a user