-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] NodeManager: code refactor and cleanup #45260
Conversation
06c254e
to
5c23d07
Compare
96cd408
to
69bb5bc
Compare
59e85c7
to
cab83a9
Compare
cab83a9
to
6903ec4
Compare
Signed-off-by: hongchaodeng <hongchaodeng1@gmail.com>
6903ec4
to
bb9ea4a
Compare
src/ray/raylet/node_manager.h
Outdated
@@ -196,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, | |||
const std::vector<rpc::ObjectReference> object_ids, | |||
std::vector<rpc::ObjectReference> object_ids, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this to const &?
Also need to update in node_manager.cc as well
src/ray/raylet/raylet.cc
Outdated
@@ -100,11 +100,13 @@ 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 ? instance_id : ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the old way is actually preferred for checking whether pointer is nullptr: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#es87-dont-add-redundant--or--to-conditions
7da2f5b
to
9465bd5
Compare
@jjyao Fixed |
Why are these changes needed?
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.