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

xds: change controlPlaneClient and loadReportClient to use xdsTransportFactory #10829

Merged
merged 3 commits into from
Jan 26, 2024

Conversation

YifeiZhuang
Copy link
Contributor

"Ignore an unknown type of DiscoveryResponse: {0}",
response.getTypeUrl());

call.startRecvMessage();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do the startRecvMessage here? If the flow goes down other paths it isn't done and wasn't done in the original.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is important to add startRecvMessage() here. Before this PR it is request(1).

This is for the flow control. We do it manually. For each response, we have to call request(1) at the end of the process. Normally it is at the end of handleRpcReponse in processTracker.

call.startRecvMessage();
return;
}
handleRpcResponse(type, response.getVersionInfo(), response.getResourcesList(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Even though the underlying xdsResponseHandler.handleResourceResponse expects this format, it would be cleaner to pass handleRpcResponse the whole response message and let it do the parsing in case in the future it wants to consider something else from the response.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I think this is what the current structure is. This is the interface between xdsClientImpl and ControlPlaneClient. The response proto does not have too many interesting fields. Although it might be for sustainable if we define a Arg data structure instead of extending the parameter list. But to me it is fine for now and it is internal.

xds/src/main/java/io/grpc/xds/ControlPlaneClient.java Outdated Show resolved Hide resolved
xds/src/main/java/io/grpc/xds/LoadReportClient.java Outdated Show resolved Hide resolved
@YifeiZhuang YifeiZhuang merged commit 8e1cc94 into grpc:master Jan 26, 2024
14 checks passed
@YifeiZhuang YifeiZhuang deleted the xds-transport-factory2 branch January 26, 2024 01:05
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants