-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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] push down GetAllNodeInfo and GetAllWorkerInfo filters to GCS. #47213
Conversation
Signed-off-by: Ruiyang Wang <[email protected]>
@rkooo567 could you review this one? |
Signed-off-by: Ruiyang Wang <[email protected]>
Signed-off-by: Ruiyang Wang <[email protected]>
Signed-off-by: Ruiyang Wang <[email protected]>
@@ -341,7 +340,7 @@ async def list_nodes(self, *, option: ListApiOptions) -> ListApiResponse: | |||
result = list(islice(result, option.limit)) | |||
return ListApiResponse( | |||
result=result, | |||
total=total_nodes, | |||
total=reply.total, |
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.
QQ: this includes filtered numbers too. right?
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.
req_filters = GetAllWorkerInfoRequest.Filters() | ||
for filter in filters: | ||
key, predicate, value = filter | ||
# Special treatments for the Ray Debugger. |
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 an unit test?
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.
Unit test already exists at
ray/python/ray/tests/test_worker_state.py
Line 21 in fc17ff4
def test_worker_paused(shutdown_only): |
): | ||
req_filters.exist_paused_threads = True | ||
continue | ||
if key == "is_alive" and predicate == "=" and value == "True": |
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 value be something like 'true' btw? (not 'True')
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.
updated. now it supports True, true, 1.
Signed-off-by: Ruiyang Wang <[email protected]>
Signed-off-by: Ruiyang Wang <[email protected]>
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.
@rynewang please address
#47213 (comment) before merging
Signed-off-by: Ruiyang Wang <[email protected]>
Signed-off-by: Ruiyang Wang <[email protected]>
Signed-off-by: Ruiyang Wang <[email protected]>
GetAllNodeInfo filters supported: node_id, state, node_name.
GetAllWorkerInfo filters supported: (num_paused_threads != 0), (is_alive == True).
Note that GetAllWorkerInfo filters are used by the Ray Debugger.