[Release] Revert Enable GCS Server by Default (#7840)

This commit is contained in:
Simon Mo
2020-04-01 10:05:07 -07:00
committed by GitHub
parent c23e56ce9a
commit 1ab98155eb
13 changed files with 26 additions and 54 deletions
-9
View File
@@ -273,12 +273,3 @@ RAY_CONFIG(uint32_t, object_store_full_initial_delay_ms, 1000)
/// Duration to wait between retries for failed tasks.
RAY_CONFIG(uint32_t, task_retry_delay_ms, 5000)
/// Whether to enable gcs service.
/// RAY_GCS_SERVICE_ENABLED is an env variable which only set in ci job.
/// If the value of RAY_GCS_SERVICE_ENABLED is false, we will disable gcs service,
/// otherwise gcs service is enabled.
/// TODO(ffbin): Once we entirely migrate to service-based GCS, we should remove it.
RAY_CONFIG(bool, gcs_service_enabled,
getenv("RAY_GCS_SERVICE_ENABLED") == nullptr ||
getenv("RAY_GCS_SERVICE_ENABLED") == std::string("true"))
+1 -1
View File
@@ -115,7 +115,7 @@ CoreWorker::CoreWorker(const WorkerType worker_type, const Language language,
RayLog::InstallFailureSignalHandler();
}
// Initialize gcs client.
if (RayConfig::instance().gcs_service_enabled()) {
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);
+1 -1
View File
@@ -109,7 +109,7 @@ class CoreWorkerTest : public ::testing::Test {
}
// start gcs server
if (RayConfig::instance().gcs_service_enabled()) {
if (getenv("RAY_GCS_SERVICE_ENABLED") != nullptr) {
gcs_server_pid_ = StartGcsServer("127.0.0.1");
} else {
// core worker test relies on node resources. It's important that one raylet can
+10 -19
View File
@@ -145,27 +145,18 @@ std::unique_ptr<rpc::ObjectInfoHandler> GcsServer::InitObjectInfoHandler() {
void GcsServer::StoreGcsServerAddressInRedis() {
boost::asio::ip::detail::endpoint primary_endpoint;
boost::asio::ip::tcp::resolver resolver(main_service_);
boost::asio::ip::tcp::resolver::query query(
boost::asio::ip::host_name(), "",
boost::asio::ip::resolver_query_base::flags::v4_mapped);
boost::system::error_code error_code;
boost::asio::ip::tcp::resolver::iterator iter = resolver.resolve(query, error_code);
boost::asio::ip::tcp::resolver::query query(boost::asio::ip::host_name(), "");
boost::asio::ip::tcp::resolver::iterator iter = resolver.resolve(query);
boost::asio::ip::tcp::resolver::iterator end; // End marker.
if (!error_code) {
while (iter != end) {
boost::asio::ip::tcp::endpoint ep = *iter;
if (ep.address().is_v4() && !ep.address().is_loopback() &&
!ep.address().is_multicast()) {
primary_endpoint.address(ep.address());
primary_endpoint.port(ep.port());
break;
}
iter++;
while (iter != end) {
boost::asio::ip::tcp::endpoint ep = *iter;
if (ep.address().is_v4() && !ep.address().is_loopback() &&
!ep.address().is_multicast()) {
primary_endpoint.address(ep.address());
primary_endpoint.port(ep.port());
break;
}
} else {
RAY_LOG(WARNING) << "Failed to resolve ip address, error = "
<< strerror(error_code.value());
iter = end;
iter++;
}
std::string address;
+2 -1
View File
@@ -177,7 +177,8 @@ int main(int argc, char *argv[]) {
ray::gcs::GcsClientOptions client_options(redis_address, redis_port, redis_password);
std::shared_ptr<ray::gcs::GcsClient> gcs_client;
if (RayConfig::instance().gcs_service_enabled()) {
// RAY_GCS_SERVICE_ENABLED only set in ci job, so we just check if it is null.
if (getenv("RAY_GCS_SERVICE_ENABLED") != nullptr) {
gcs_client = std::make_shared<ray::gcs::ServiceBasedGcsClient>(client_options);
} else {
gcs_client = std::make_shared<ray::gcs::RedisGcsClient>(client_options);