Skip to content
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] Replace GCS stubs in dashboard to use NewGcsAioClient. #46846

Merged
merged 4 commits into from
Aug 1, 2024

Conversation

rynewang
Copy link
Contributor

@rynewang rynewang commented Jul 29, 2024

This is part of the effort to remove all direct grpc calls to GCS server. Now, actor_head.py, node_head.py and snapshot_head.py makes direct call for service ActorInfoGcsService.GetAllActorInfo and alike. This PR makes the binding in NewGcsClient and feature flag it under RAY_USE_OLD_GCS_CLIENT.

How it works: the grpc calling code is extracted to a separate class. The class keeps a GcsAioClient or a stub, depends on that env var.

This PR applies to all where _dashboard_head.aiogrpc_gcs_channel is used, except for StateDataSourceClient which itself deserves a dedicated PR.

With this PR and a future one replacing usage in StateDataSourceClient, once we remove the old gcs client, we can delete aiogrpc_gcs_channel in DashboardHead once and for all.

Changes:

  • actor_head.py: GetAllActorInfo
  • node_head.py: GetAllNodeInfo
  • snapshot_head.py: KillActorViaGcs

For each method, adds timeout_ms in accessor.h|cc, adds pxd binding and pxi implementation.

Signed-off-by: Ruiyang Wang <rywang014@gmail.com>
@rynewang rynewang assigned jjyao and unassigned jjyao Jul 29, 2024
@rynewang rynewang marked this pull request as draft July 29, 2024 17:43
Signed-off-by: Ruiyang Wang <rywang014@gmail.com>
@rynewang rynewang changed the title [core] Replace GCS stub in actor_head.py with GcsClient by new binding get_all_actor_info [core] Replace GCS stubs in dashboard to use NewGcsAioClient. Jul 29, 2024
Signed-off-by: Ruiyang Wang <rywang014@gmail.com>
Signed-off-by: Ruiyang Wang <rywang014@gmail.com>
@rynewang rynewang marked this pull request as ready for review July 31, 2024 21:50
@rynewang rynewang requested a review from a team as a code owner July 31, 2024 21:50
Comment on lines +651 to +654
b = c_proto.SerializeAsString()
proto = gcs_pb2.ActorTableData()
proto.ParseFromString(b)
actor_table_data[ActorID.from_binary(proto.actor_id)] = proto
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is the extra overhead introduced in this PR since the old way doesn't go through c++ at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say yes since there's one more conversion happening. But Actor Info is not big anyway since the bulk part is split out to the ActorTask table.

@jjyao jjyao added the go add ONLY when ready to merge, run all tests label Aug 1, 2024
@rynewang rynewang merged commit 65fde27 into ray-project:master Aug 1, 2024
5 of 6 checks passed
@rynewang rynewang deleted the get-all-actor-info branch August 1, 2024 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants