-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[Dashboard]Don't set node actors when node_id of actor is Nil #13573
Conversation
Doesn't this mean we cannot get dead actors information? |
We can still get dead actors, no matter before or after this change, as even an actor is dead, its raylet id still is valid(not empty). This pr fix bug that when a new actor coming, it carries empty raylet id because it has not been allocated yet. Then the dashboard will put information of this actor into |
node_actors = dict(DataSource.node_actors.get(node_id, {})) | ||
node_actors[actor_id] = actor_table_data | ||
DataSource.node_actors[node_id] = node_actors | ||
if node_id != "f" * 56: |
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.
It's better to set a const in stats_collector_consts.py
NIL_NODE_ID = ray.NodeID.nil().hex()
then check if node_id != stats_collector_consts.NIL_NODE_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.
Sounds like a good idea!
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.
Can you add this check to GetAllActorInfo
processing logic, too? Then, the assertion could be added to the test_stats_collector.py
:
# Start a cluster and a actor, use the resource constraints to prevent the actor from being alive
response = requests.get(webui_url + "/test/dump?key=node_actors")
response.raise_for_status()
result = response.json()
assert stats_collector_consts.NIL_NODE_ID not in result["data"]["node_actors"]
Good catch! The value of |
Ping me after addressing @fyrestone's comment! |
I will merge upon his approval |
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.
LGTM
@rkooo567 It's ok to go! |
…oject#13573) * Don't set node actors when node_id of actor is Nil * add test per comment
…ray-project#13573)" This reverts commit c33f889.
Why are these changes needed?
When actor is not ALIVE, normally it's raylet id is not set when published. The raylet id would be Nil("ffffffffffffffffffffffffffffffffffffffffffffffffffffffff", aka "f" * 56).
We should not update node_actors when the raylet id is Nil.
Related issue number
Checks
scripts/format.sh
to lint the changes in this PR.