-
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] Replace GCS stubs in dashboard to use NewGcsAioClient. #46846
Conversation
Signed-off-by: Ruiyang Wang <rywang014@gmail.com>
Signed-off-by: Ruiyang Wang <rywang014@gmail.com>
Signed-off-by: Ruiyang Wang <rywang014@gmail.com>
b = c_proto.SerializeAsString() | ||
proto = gcs_pb2.ActorTableData() | ||
proto.ParseFromString(b) | ||
actor_table_data[ActorID.from_binary(proto.actor_id)] = proto |
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.
So this is the extra overhead introduced in this PR since the old way doesn't go through c++ at all?
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'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.
This is part of the effort to remove all direct grpc calls to GCS server. Now,
actor_head.py
,node_head.py
andsnapshot_head.py
makes direct call for serviceActorInfoGcsService.GetAllActorInfo
and alike. This PR makes the binding in NewGcsClient and feature flag it underRAY_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 forStateDataSourceClient
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 deleteaiogrpc_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
inaccessor.h|cc
, adds pxd binding and pxi implementation.