Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
Signed-off-by: hongchaodeng <hongchaodeng1@gmail.com>
  • Loading branch information
hongchaodeng committed May 13, 2024
1 parent bb9ea4a commit 9465bd5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
7 changes: 3 additions & 4 deletions src/ray/raylet/node_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2050,10 +2050,9 @@ void NodeManager::HandleCancelWorkerLease(rpc::CancelWorkerLeaseRequest request,
send_reply_callback(Status::OK(), nullptr, nullptr);
}

void NodeManager::MarkObjectsAsFailed(
const ErrorType &error_type,
const std::vector<rpc::ObjectReference> objects_to_fail,
const JobID &job_id) {
void NodeManager::MarkObjectsAsFailed(const ErrorType &error_type,
std::vector<rpc::ObjectReference> &objects_to_fail,
const JobID &job_id) {
// TODO(swang): Ideally we should return the error directly to the client
// that needs this object instead of storing the object in plasma, which is
// not guaranteed to succeed. This avoids hanging the client if plasma is not
Expand Down
2 changes: 1 addition & 1 deletion src/ray/raylet/node_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class NodeManager : public rpc::NodeManagerServiceHandler,
/// \param object_ids The object ids to store error messages into.
/// \param job_id The optional job to push errors to if the writes fail.
void MarkObjectsAsFailed(const ErrorType &error_type,
std::vector<rpc::ObjectReference> object_ids,
std::vector<rpc::ObjectReference> &object_ids,
const JobID &job_id);

/// Stop this node manager.
Expand Down
8 changes: 3 additions & 5 deletions src/ray/raylet/raylet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,11 @@ Raylet::Raylet(instrumented_io_context &main_service,

// Setting up autoscaler related fields from ENV
auto instance_id = std::getenv(kNodeCloudInstanceIdEnv);
self_node_info_.set_instance_id((instance_id != nullptr) ? instance_id : "");
self_node_info_.set_instance_id(instance_id ? instance_id : "");
auto cloud_node_type_name = std::getenv(kNodeTypeNameEnv);
self_node_info_.set_node_type_name(
(cloud_node_type_name != nullptr) ? cloud_node_type_name : "");
self_node_info_.set_node_type_name(cloud_node_type_name ? cloud_node_type_name : "");
auto instance_type_name = std::getenv(kNodeCloudInstanceTypeNameEnv);
self_node_info_.set_instance_type_name(
(instance_type_name != nullptr) ? instance_type_name : "");
self_node_info_.set_instance_type_name(instance_type_name ? instance_type_name : "");
}

Raylet::~Raylet() {}
Expand Down

0 comments on commit 9465bd5

Please sign in to comment.