diff --git a/src/ray/common/test_util.h b/src/ray/common/test_util.h index d91fb62b10f5..41713486fbcb 100644 --- a/src/ray/common/test_util.h +++ b/src/ray/common/test_util.h @@ -14,7 +14,6 @@ #pragma once -#include #include #include #include diff --git a/src/ray/core_worker/core_worker.cc b/src/ray/core_worker/core_worker.cc index d3a4b476fb29..e5fd8882fe58 100644 --- a/src/ray/core_worker/core_worker.cc +++ b/src/ray/core_worker/core_worker.cc @@ -1505,7 +1505,7 @@ Status CoreWorker::ExperimentalRegisterMutableObjectReaderRemote( .AsyncGet(reader_actor, [&addr, &promise]( Status status, - const boost::optional &result) { + const std::optional &result) { RAY_CHECK(result); if (result) { addr.set_ip_address(result->address().ip_address()); diff --git a/src/ray/gcs/callback.h b/src/ray/gcs/callback.h index 0ef4921c8275..9ce5e0c631c3 100644 --- a/src/ray/gcs/callback.h +++ b/src/ray/gcs/callback.h @@ -14,7 +14,7 @@ #pragma once -#include +#include #include #include "ray/common/status.h" @@ -36,7 +36,7 @@ using StatusCallback = std::function; /// this optional object is empty. template using OptionalItemCallback = - std::function &result)>; + std::function &result)>; /// This callback is used to receive multiple items from GCS when a read completes. /// \param status Status indicates whether the read was successful. diff --git a/src/ray/gcs/gcs_client/accessor.cc b/src/ray/gcs/gcs_client/accessor.cc index 1ff52e9b4f18..5801fe70a0d7 100644 --- a/src/ray/gcs/gcs_client/accessor.cc +++ b/src/ray/gcs/gcs_client/accessor.cc @@ -159,7 +159,7 @@ Status ActorInfoAccessor::AsyncGet( if (reply.has_actor_table_data()) { callback(status, reply.actor_table_data()); } else { - callback(status, boost::none); + callback(status, std::nullopt); } RAY_LOG(DEBUG) << "Finished getting actor info, status = " << status << ", actor id = " << actor_id @@ -210,7 +210,7 @@ Status ActorInfoAccessor::AsyncGetByName( if (reply.has_actor_table_data()) { callback(status, reply.actor_table_data()); } else { - callback(status, boost::none); + callback(status, std::nullopt); } RAY_LOG(DEBUG) << "Finished getting actor info, status = " << status << ", name = " << name; @@ -249,7 +249,7 @@ Status ActorInfoAccessor::AsyncListNamedActors( request, [callback](const Status &status, const rpc::ListNamedActorsReply &reply) { if (!status.ok()) { - callback(status, boost::none); + callback(status, std::nullopt); } else { callback(status, VectorFromProtobuf(reply.named_actors_list())); } @@ -359,7 +359,7 @@ Status ActorInfoAccessor::AsyncSubscribe( [this, actor_id, subscribe](const StatusCallback &fetch_done) { auto callback = [actor_id, subscribe, fetch_done]( const Status &status, - const boost::optional &result) { + const std::optional &result) { if (result) { subscribe(actor_id, *result); } @@ -945,7 +945,7 @@ Status WorkerInfoAccessor::AsyncGet( if (reply.has_worker_table_data()) { callback(status, reply.worker_table_data()); } else { - callback(status, boost::none); + callback(status, std::nullopt); } RAY_LOG(DEBUG) << "Finished getting worker info, worker id = " << worker_id; }); @@ -1059,7 +1059,7 @@ Status PlacementGroupInfoAccessor::AsyncGet( if (reply.has_placement_group_table_data()) { callback(status, reply.placement_group_table_data()); } else { - callback(status, boost::none); + callback(status, std::nullopt); } RAY_LOG(DEBUG) << "Finished getting placement group info, placement group id = " << placement_group_id; @@ -1083,7 +1083,7 @@ Status PlacementGroupInfoAccessor::AsyncGetByName( if (reply.has_placement_group_table_data()) { callback(status, reply.placement_group_table_data()); } else { - callback(status, boost::none); + callback(status, std::nullopt); } RAY_LOG(DEBUG) << "Finished getting named placement group info, status = " << status << ", name = " << name; @@ -1133,7 +1133,7 @@ Status InternalKVAccessor::AsyncInternalKVGet( req, [callback](const Status &status, const rpc::InternalKVGetReply &reply) { if (reply.status().code() == (int)StatusCode::NotFound) { - callback(status, boost::none); + callback(status, std::nullopt); } else { callback(status, reply.value()); } @@ -1239,7 +1239,7 @@ Status InternalKVAccessor::AsyncInternalKVKeys( req, [callback](const Status &status, const rpc::InternalKVKeysReply &reply) { if (!status.ok()) { - callback(status, boost::none); + callback(status, std::nullopt); } else { callback(status, VectorFromProtobuf(reply.results())); } @@ -1261,7 +1261,7 @@ Status InternalKVAccessor::Put(const std::string &ns, value, overwrite, timeout_ms, - [&ret_promise, &added](Status status, boost::optional added_num) { + [&ret_promise, &added](Status status, std::optional added_num) { added = static_cast(added_num.value_or(0)); ret_promise.set_value(status); })); @@ -1324,7 +1324,7 @@ Status InternalKVAccessor::Del(const std::string &ns, key, del_by_prefix, timeout_ms, - [&ret_promise, &num_deleted](Status status, const boost::optional &value) { + [&ret_promise, &num_deleted](Status status, const std::optional &value) { num_deleted = value.value_or(0); ret_promise.set_value(status); })); @@ -1340,7 +1340,7 @@ Status InternalKVAccessor::Exists(const std::string &ns, ns, key, timeout_ms, - [&ret_promise, &exists](Status status, const boost::optional &value) { + [&ret_promise, &exists](Status status, const std::optional &value) { exists = value.value_or(false); ret_promise.set_value(status); })); diff --git a/src/ray/gcs/gcs_client/global_state_accessor.cc b/src/ray/gcs/gcs_client/global_state_accessor.cc index bc4dd7ec96a4..7f525ea39e12 100644 --- a/src/ray/gcs/gcs_client/global_state_accessor.cc +++ b/src/ray/gcs/gcs_client/global_state_accessor.cc @@ -244,7 +244,7 @@ uint32_t GlobalStateAccessor::GetWorkerDebuggerPort(const WorkerID &worker_id) { RAY_CHECK_OK(gcs_client_->Workers().AsyncGet( worker_id, [&promise](const Status &status, - const boost::optional &result) { + const std::optional &result) { RAY_CHECK_OK(status); if (result.has_value()) { promise.set_value(result->debugger_port()); @@ -378,7 +378,7 @@ std::string GlobalStateAccessor::GetSystemConfig() { absl::ReaderMutexLock lock(&mutex_); RAY_CHECK_OK(gcs_client_->Nodes().AsyncGetInternalConfig( [&promise](const Status &status, - const boost::optional &stored_raylet_config) { + const std::optional &stored_raylet_config) { RAY_CHECK_OK(status); promise.set_value(*stored_raylet_config); })); diff --git a/src/ray/gcs/gcs_client/global_state_accessor.h b/src/ray/gcs/gcs_client/global_state_accessor.h index 81e30861815e..44ef82db6bd5 100644 --- a/src/ray/gcs/gcs_client/global_state_accessor.h +++ b/src/ray/gcs/gcs_client/global_state_accessor.h @@ -249,7 +249,7 @@ class GlobalStateAccessor { template OptionalItemCallback TransformForOptionalItemCallback( std::unique_ptr &data, std::promise &promise) { - return [&data, &promise](const Status &status, const boost::optional &result) { + return [&data, &promise](const Status &status, const std::optional &result) { RAY_CHECK_OK(status); if (result) { data.reset(new std::string(result->SerializeAsString())); diff --git a/src/ray/gcs/gcs_client/test/gcs_client_test.cc b/src/ray/gcs/gcs_client/test/gcs_client_test.cc index 48efaa8508ee..e69422a05ac7 100644 --- a/src/ray/gcs/gcs_client/test/gcs_client_test.cc +++ b/src/ray/gcs/gcs_client/test/gcs_client_test.cc @@ -278,8 +278,8 @@ class GcsClientTest : public ::testing::TestWithParam { rpc::ActorTableData actor_table_data; RAY_CHECK_OK(gcs_client_->Actors().AsyncGet( actor_id, - [&actor_table_data, &promise]( - Status status, const boost::optional &result) { + [&actor_table_data, &promise](Status status, + const std::optional &result) { assert(result); actor_table_data.CopyFrom(*result); promise.set_value(true); diff --git a/src/ray/gcs/gcs_client/usage_stats_client.cc b/src/ray/gcs/gcs_client/usage_stats_client.cc index 5fd18b2fa410..bc7842e445cc 100644 --- a/src/ray/gcs/gcs_client/usage_stats_client.cc +++ b/src/ray/gcs/gcs_client/usage_stats_client.cc @@ -35,7 +35,7 @@ void UsageStatsClient::RecordExtraUsageTag(usage::TagKey key, const std::string value, /*overwrite=*/true, GetGcsTimeoutMs(), - [](Status status, boost::optional added_num) { + [](Status status, std::optional added_num) { if (!status.ok()) { RAY_LOG(DEBUG) << "Failed to put extra usage tag, status = " << status; } diff --git a/src/ray/gcs/gcs_server/gcs_job_manager.cc b/src/ray/gcs/gcs_server/gcs_job_manager.cc index 5c8b95625970..f9238dbb1a5b 100644 --- a/src/ray/gcs/gcs_server/gcs_job_manager.cc +++ b/src/ray/gcs/gcs_server/gcs_job_manager.cc @@ -108,7 +108,7 @@ void GcsJobManager::HandleMarkJobFinished(rpc::MarkJobFinishedRequest request, Status status = gcs_table_storage_->JobTable().Get( job_id, [this, job_id, send_reply](Status status, - const boost::optional &result) { + const std::optional &result) { if (status.ok() && result) { MarkJobAsFinished(*result, send_reply); } else { diff --git a/src/ray/gcs/gcs_server/gcs_node_manager.cc b/src/ray/gcs/gcs_server/gcs_node_manager.cc index 6c04c4e1aede..b4c6b503032f 100644 --- a/src/ray/gcs/gcs_server/gcs_node_manager.cc +++ b/src/ray/gcs/gcs_server/gcs_node_manager.cc @@ -202,9 +202,9 @@ void GcsNodeManager::HandleGetInternalConfig(rpc::GetInternalConfigRequest reque rpc::SendReplyCallback send_reply_callback) { auto get_system_config = [reply, send_reply_callback]( const ray::Status &status, - const boost::optional &config) { + const std::optional &config) { if (config.has_value()) { - reply->set_config(config.get().config()); + reply->set_config(config->config()); } GCS_RPC_SEND_REPLY(send_reply_callback, reply, status); }; diff --git a/src/ray/gcs/gcs_server/gcs_placement_group_manager.cc b/src/ray/gcs/gcs_server/gcs_placement_group_manager.cc index de22db2d8638..f874c2446433 100644 --- a/src/ray/gcs/gcs_server/gcs_placement_group_manager.cc +++ b/src/ray/gcs/gcs_server/gcs_placement_group_manager.cc @@ -556,7 +556,7 @@ void GcsPlacementGroupManager::HandleGetPlacementGroup( auto on_done = [placement_group_id, reply, send_reply_callback]( const Status &status, - const boost::optional &result) { + const std::optional &result) { if (result) { reply->mutable_placement_group_table_data()->CopyFrom(*result); } @@ -572,7 +572,7 @@ void GcsPlacementGroupManager::HandleGetPlacementGroup( Status status = gcs_table_storage_->PlacementGroupTable().Get(placement_group_id, on_done); if (!status.ok()) { - on_done(status, boost::none); + on_done(status, std::nullopt); } } ++counts_[CountType::GET_PLACEMENT_GROUP_REQUEST]; @@ -683,7 +683,7 @@ void GcsPlacementGroupManager::WaitPlacementGroup( // Check whether the placement group does not exist or is removed. auto on_done = [this, placement_group_id, callback]( const Status &status, - const boost::optional &result) { + const std::optional &result) { if (result) { RAY_LOG(DEBUG) << "Placement group is removed, placement group id = " << placement_group_id; @@ -703,7 +703,7 @@ void GcsPlacementGroupManager::WaitPlacementGroup( Status status = gcs_table_storage_->PlacementGroupTable().Get(placement_group_id, on_done); if (!status.ok()) { - on_done(status, boost::none); + on_done(status, std::nullopt); } } else if (iter->second->GetState() == rpc::PlacementGroupTableData::CREATED) { RAY_LOG(DEBUG) << "Placement group is created, placement group id = " diff --git a/src/ray/gcs/gcs_server/gcs_table_storage.cc b/src/ray/gcs/gcs_server/gcs_table_storage.cc index 1d7c71d8ebff..4e16c2cabe50 100644 --- a/src/ray/gcs/gcs_server/gcs_table_storage.cc +++ b/src/ray/gcs/gcs_server/gcs_table_storage.cc @@ -40,11 +40,11 @@ template Status GcsTable::Get(const Key &key, const OptionalItemCallback &callback) { auto on_done = [callback](const Status &status, - const boost::optional &result) { + const std::optional &result) { if (!callback) { return; } - boost::optional value; + std::optional value; if (result) { Data data; data.ParseFromString(*result); diff --git a/src/ray/gcs/gcs_server/gcs_worker_manager.cc b/src/ray/gcs/gcs_server/gcs_worker_manager.cc index a2038997e401..5206113ce9e3 100644 --- a/src/ray/gcs/gcs_server/gcs_worker_manager.cc +++ b/src/ray/gcs/gcs_server/gcs_worker_manager.cc @@ -33,7 +33,7 @@ void GcsWorkerManager::HandleReportWorkerFailure( worker_id = std::move(worker_id), request = std::move(request), worker_address = - std::move(worker_address)](const boost::optional &result) { + std::move(worker_address)](const std::optional &result) { const auto node_id = NodeID::FromBinary(worker_address.raylet_id()); std::string message = absl::StrCat("Reporting worker exit, worker id = ", @@ -136,7 +136,7 @@ void GcsWorkerManager::HandleGetWorkerInfo(rpc::GetWorkerInfoRequest request, GetWorkerInfo(worker_id, [reply, send_reply_callback, worker_id = std::move(worker_id)]( - const boost::optional &result) { + const std::optional &result) { if (result) { reply->mutable_worker_table_data()->CopyFrom(*result); } @@ -221,7 +221,7 @@ void GcsWorkerManager::HandleUpdateWorkerDebuggerPort( auto on_worker_get_done = [&, worker_id, reply, debugger_port, on_worker_update_done, send_reply_callback]( - const Status &status, const boost::optional &result) { + const Status &status, const std::optional &result) { if (!status.ok()) { RAY_LOG(WARNING) << "Failed to get worker info, worker id = " << worker_id << ", status = " << status; @@ -274,7 +274,7 @@ void GcsWorkerManager::HandleUpdateWorkerNumPausedThreads( on_worker_update_done, send_reply_callback]( const Status &status, - const boost::optional &result) { + const std::optional &result) { if (!status.ok()) { RAY_LOG(WARNING) << "Failed to get worker info, worker id = " << worker_id << ", status = " << status; @@ -309,14 +309,13 @@ void GcsWorkerManager::AddWorkerDeadListener( void GcsWorkerManager::GetWorkerInfo( const WorkerID &worker_id, - std::function &)> callback) const { + std::function &)> callback) const { auto on_done = [worker_id, callback = std::move(callback)]( - const Status &status, - const boost::optional &result) { + const Status &status, const std::optional &result) { if (!status.ok()) { RAY_LOG(WARNING) << "Failed to get worker info, worker id = " << worker_id << ", status = " << status; - callback(boost::none); + callback(std::nullopt); } else { callback(result); } @@ -324,7 +323,7 @@ void GcsWorkerManager::GetWorkerInfo( Status status = gcs_table_storage_->WorkerTable().Get(worker_id, on_done); if (!status.ok()) { - on_done(status, boost::none); + on_done(status, std::nullopt); } } diff --git a/src/ray/gcs/gcs_server/gcs_worker_manager.h b/src/ray/gcs/gcs_server/gcs_worker_manager.h index 79e668d816b2..0012f2250c87 100644 --- a/src/ray/gcs/gcs_server/gcs_worker_manager.h +++ b/src/ray/gcs/gcs_server/gcs_worker_manager.h @@ -67,7 +67,7 @@ class GcsWorkerManager : public rpc::WorkerInfoHandler { private: void GetWorkerInfo( const WorkerID &worker_id, - std::function &)> callback) const; + std::function &)> callback) const; std::shared_ptr gcs_table_storage_; std::shared_ptr gcs_publisher_; diff --git a/src/ray/gcs/gcs_server/test/gcs_health_check_manager_test.cc b/src/ray/gcs/gcs_server/test/gcs_health_check_manager_test.cc index 31be1bbd5d6d..1f0722a6d6d7 100644 --- a/src/ray/gcs/gcs_server/test/gcs_health_check_manager_test.cc +++ b/src/ray/gcs/gcs_server/test/gcs_health_check_manager_test.cc @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ray/gcs/gcs_server/test/gcs_server_rpc_test.cc b/src/ray/gcs/gcs_server/test/gcs_server_rpc_test.cc index 136ef2a1017f..3cc834ac91b6 100644 --- a/src/ray/gcs/gcs_server/test/gcs_server_rpc_test.cc +++ b/src/ray/gcs/gcs_server/test/gcs_server_rpc_test.cc @@ -87,10 +87,10 @@ class GcsServerTest : public ::testing::Test { return WaitReady(promise.get_future(), timeout_ms_); } - boost::optional GetActorInfo(const std::string &actor_id) { + std::optional GetActorInfo(const std::string &actor_id) { rpc::GetActorInfoRequest request; request.set_actor_id(actor_id); - boost::optional actor_table_data_opt; + std::optional actor_table_data_opt; std::promise promise; client_->GetActorInfo(request, [&actor_table_data_opt, &promise]( @@ -99,7 +99,7 @@ class GcsServerTest : public ::testing::Test { if (reply.has_actor_table_data()) { actor_table_data_opt = reply.actor_table_data(); } else { - actor_table_data_opt = boost::none; + actor_table_data_opt = std::nullopt; } promise.set_value(true); }); @@ -158,10 +158,10 @@ class GcsServerTest : public ::testing::Test { return WaitReady(promise.get_future(), timeout_ms_); } - boost::optional GetWorkerInfo(const std::string &worker_id) { + std::optional GetWorkerInfo(const std::string &worker_id) { rpc::GetWorkerInfoRequest request; request.set_worker_id(worker_id); - boost::optional worker_table_data_opt; + std::optional worker_table_data_opt; std::promise promise; client_->GetWorkerInfo( request, @@ -171,7 +171,7 @@ class GcsServerTest : public ::testing::Test { if (reply.has_worker_table_data()) { worker_table_data_opt = reply.worker_table_data(); } else { - worker_table_data_opt = boost::none; + worker_table_data_opt = std::nullopt; } promise.set_value(true); }); @@ -320,7 +320,7 @@ TEST_F(GcsServerTest, TestWorkerInfo) { ASSERT_TRUE(GetAllWorkerInfo().size() == 2); // Get worker info - boost::optional result = + std::optional result = GetWorkerInfo(worker_data->worker_address().worker_id()); ASSERT_TRUE(result->worker_address().worker_id() == worker_data->worker_address().worker_id()); diff --git a/src/ray/gcs/gcs_server/test/gcs_table_storage_test_base.h b/src/ray/gcs/gcs_server/test/gcs_table_storage_test_base.h index 642078dfeb6c..ad6e860c1c53 100644 --- a/src/ray/gcs/gcs_server/test/gcs_table_storage_test_base.h +++ b/src/ray/gcs/gcs_server/test/gcs_table_storage_test_base.h @@ -109,7 +109,7 @@ class GcsTableStorageTestBase : public ::testing::Test { template int Get(TABLE &table, const KEY &key, std::vector &values) { auto on_done = [this, &values](const Status &status, - const boost::optional &result) { + const std::optional &result) { RAY_CHECK_OK(status); values.clear(); if (result) { diff --git a/src/ray/gcs/store_client/in_memory_store_client.cc b/src/ray/gcs/store_client/in_memory_store_client.cc index b00a051965d3..08792e2197ad 100644 --- a/src/ray/gcs/store_client/in_memory_store_client.cc +++ b/src/ray/gcs/store_client/in_memory_store_client.cc @@ -49,7 +49,7 @@ Status InMemoryStoreClient::AsyncGet(const std::string &table_name, auto table = GetOrCreateTable(table_name); absl::MutexLock lock(&(table->mutex_)); auto iter = table->records_.find(key); - boost::optional data; + std::optional data; if (iter != table->records_.end()) { data = iter->second; } diff --git a/src/ray/gcs/store_client/redis_store_client.cc b/src/ray/gcs/store_client/redis_store_client.cc index d42bac822e6c..81d1ce292aa7 100644 --- a/src/ray/gcs/store_client/redis_store_client.cc +++ b/src/ray/gcs/store_client/redis_store_client.cc @@ -160,7 +160,7 @@ Status RedisStoreClient::AsyncGet(const std::string &table_name, RAY_CHECK(callback != nullptr); auto redis_callback = [callback](const std::shared_ptr &reply) { - boost::optional result; + std::optional result; if (!reply->IsNil()) { result = reply->ReadAsString(); } diff --git a/src/ray/gcs/store_client/test/redis_store_client_test.cc b/src/ray/gcs/store_client/test/redis_store_client_test.cc index 8a30d383d60a..aa8e863d3e85 100644 --- a/src/ray/gcs/store_client/test/redis_store_client_test.cc +++ b/src/ray/gcs/store_client/test/redis_store_client_test.cc @@ -306,7 +306,7 @@ TEST_F(RedisStoreClientTest, Random) { auto m_get = [&, counter, this](size_t idx) { auto k = std::to_string(std::rand() % 1000); - boost::optional v; + std::optional v; if (dict.count(k)) { v = dict[k]; } diff --git a/src/ray/gcs/store_client/test/store_client_test_base.h b/src/ray/gcs/store_client/test/store_client_test_base.h index ebdee3c683d6..ca373604e30e 100644 --- a/src/ray/gcs/store_client/test/store_client_test_base.h +++ b/src/ray/gcs/store_client/test/store_client_test_base.h @@ -86,7 +86,7 @@ class StoreClientTestBase : public ::testing::Test { void Get() { auto get_callback = [this](const Status &status, - const boost::optional &result) { + const std::optional &result) { RAY_CHECK_OK(status); RAY_CHECK(result); rpc::ActorTableData data; @@ -107,7 +107,7 @@ class StoreClientTestBase : public ::testing::Test { for (const auto &[k, _] : key_to_value_) { auto key = k.Hex(); auto get_callback = [this, key](const Status &status, - const boost::optional &result) { + const std::optional &result) { RAY_CHECK_OK(status); RAY_CHECK(!result); --pending_count_; diff --git a/src/ray/raylet/main.cc b/src/ray/raylet/main.cc index 6c49782a5aef..6f2e70b035f5 100644 --- a/src/ray/raylet/main.cc +++ b/src/ray/raylet/main.cc @@ -270,11 +270,10 @@ int main(int argc, char *argv[]) { }; RAY_CHECK_OK(gcs_client->Nodes().AsyncGetInternalConfig( - [&](::ray::Status status, - const boost::optional &stored_raylet_config) { + [&](::ray::Status status, const std::optional &stored_raylet_config) { RAY_CHECK_OK(status); RAY_CHECK(stored_raylet_config.has_value()); - RayConfig::instance().initialize(stored_raylet_config.get()); + RayConfig::instance().initialize(*stored_raylet_config); ray::asio::testing::init(); // Core worker tries to kill child processes when it exits. But they can't do @@ -312,7 +311,7 @@ int main(int argc, char *argv[]) { ? static_cast(num_cpus_it->second) : 0; - node_manager_config.raylet_config = stored_raylet_config.get(); + node_manager_config.raylet_config = *stored_raylet_config; node_manager_config.resource_config = ray::ResourceSet(static_resource_conf); RAY_LOG(DEBUG) << "Starting raylet with static resource configuration: " << node_manager_config.resource_config.DebugString(); diff --git a/src/ray/raylet/runtime_env_agent_client_test.cc b/src/ray/raylet/runtime_env_agent_client_test.cc index f2e140a9231e..398f07a22ad1 100644 --- a/src/ray/raylet/runtime_env_agent_client_test.cc +++ b/src/ray/raylet/runtime_env_agent_client_test.cc @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ray/raylet/worker_pool.h b/src/ray/raylet/worker_pool.h index dcd705addcd4..cb7744419a5d 100644 --- a/src/ray/raylet/worker_pool.h +++ b/src/ray/raylet/worker_pool.h @@ -231,6 +231,8 @@ class WorkerPool : public WorkerPoolInterface, public IOWorkerPoolInterface { /// \brief Get the job config by job id. /// + /// We don't return std::optional because it does not support references. + /// /// \param job_id ID of the job. /// \return Job config if given job is running, else nullptr. boost::optional GetJobConfig(const JobID &job_id) const;