Skip to content

Add ConfigSelector API.#23051

Merged
markdroth merged 1 commit intogrpc:masterfrom
markdroth:xds_config_selector2
Jun 22, 2020
Merged

Add ConfigSelector API.#23051
markdroth merged 1 commit intogrpc:masterfrom
markdroth:xds_config_selector2

Conversation

@markdroth
Copy link
Copy Markdown
Member

@markdroth markdroth commented May 26, 2020

This is an internal API that will be used for the xDS RouteAction design.


This change is Reviewable

@markdroth markdroth added the release notes: no Indicates if PR should not be in release notes label May 26, 2020
@markdroth markdroth force-pushed the xds_config_selector2 branch from 88aa021 to 432cfae Compare May 26, 2020 21:17
@markdroth markdroth force-pushed the xds_config_selector2 branch from 7c9e782 to b73ccb4 Compare June 18, 2020 19:45
@markdroth markdroth force-pushed the xds_config_selector2 branch from b73ccb4 to 133918e Compare June 18, 2020 19:57
@markdroth markdroth marked this pull request as ready for review June 19, 2020 14:17
@markdroth markdroth requested a review from donnadionne June 19, 2020 14:17
Copy link
Copy Markdown
Contributor

@donnadionne donnadionne left a comment

Choose a reason for hiding this comment

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

Reviewed 20 of 20 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @markdroth)


src/core/ext/filters/client_channel/client_channel.cc, line 1412 at r1 (raw file):

      GRPC_ERROR_REF(result.service_config_error);
  if (service_config == nullptr &&
      result.service_config_error != GRPC_ERROR_NONE) {

because of this extra check "result.service_config_error != GRPC_ERROR_NONE" we cannot assume that code after will be the case "service_config != nullptr"; does it make sense to deal with that specific case and then for everything else you will not have to have many of the check for "if (service_config != nullptr) "


src/core/ext/filters/client_channel/client_channel.cc, line 1428 at r1 (raw file):

  // Check if the config has changed.
  service_config_result.service_config_changed =
      ((service_config == nullptr) !=

Here is the logic one must be null while the other must be not-null? just checking

Copy link
Copy Markdown
Member Author

@markdroth markdroth left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @donnadionne)


src/core/ext/filters/client_channel/client_channel.cc, line 1412 at r1 (raw file):

Previously, donnadionne wrote…

because of this extra check "result.service_config_error != GRPC_ERROR_NONE" we cannot assume that code after will be the case "service_config != nullptr"; does it make sense to deal with that specific case and then for everything else you will not have to have many of the check for "if (service_config != nullptr) "

I'm not sure exactly what you're suggesting here. We need to check these two conditions independently, because they can be set independently. Even if the resolver returns a config error, we might have decided to use the default config or a saved config above.


src/core/ext/filters/client_channel/client_channel.cc, line 1428 at r1 (raw file):

Previously, donnadionne wrote…

Here is the logic one must be null while the other must be not-null? just checking

chand_->saved_service_config_ is the config we used after the previous resolver result, and service_config is the one we are going to use after this new resolver result. If the old config did not exist and the new one does, or if the old config did exist and the new one does not, then the config has changed.

Note that this logic didn't really change as part of this PR; it just moved here from ChannelData::ProcessResolverResultLocked()

@markdroth
Copy link
Copy Markdown
Member Author

Known issues: #23239

@markdroth markdroth merged commit 4d541fc into grpc:master Jun 22, 2020
@markdroth markdroth deleted the xds_config_selector2 branch June 22, 2020 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: no Indicates if PR should not be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants