Skip to content

xds: remove retained resources logics for non State-of-The-World resources #9724

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

Merged
merged 2 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix name state of the world
  • Loading branch information
YifeiZhuang committed Dec 2, 2022
commit 145eed37b526ed1520788e2a4c305315b6bacab9
4 changes: 2 additions & 2 deletions xds/src/main/java/io/grpc/xds/XdsClientImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ private <T extends ResourceUpdate> void handleResourceUpdate(XdsResourceType.Arg
}

// Nothing else to do for incremental ADS resources.
if (!xdsResourceType.isStateOfTheWorld()) {
if (!xdsResourceType.isFullStateOfTheWorld()) {
continue;
}

Expand Down Expand Up @@ -608,7 +608,7 @@ void onAbsent() {
// and the resource is reusable.
boolean ignoreResourceDeletionEnabled =
serverInfo != null && serverInfo.ignoreResourceDeletion();
if (ignoreResourceDeletionEnabled && type.isStateOfTheWorld() && data != null) {
if (ignoreResourceDeletionEnabled && type.isFullStateOfTheWorld() && data != null) {
if (!resourceDeletionIgnored) {
logger.log(XdsLogLevel.FORCE_WARNING,
"xds server {0}: ignoring deletion for resource type {1} name {2}}",
Expand Down
2 changes: 1 addition & 1 deletion xds/src/main/java/io/grpc/xds/XdsClusterResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ String typeUrlV2() {
}

@Override
boolean isStateOfTheWorld() {
boolean isFullStateOfTheWorld() {
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion xds/src/main/java/io/grpc/xds/XdsEndpointResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ String typeUrlV2() {
}

@Override
boolean isStateOfTheWorld() {
boolean isFullStateOfTheWorld() {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion xds/src/main/java/io/grpc/xds/XdsListenerResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ String typeUrlV2() {
}

@Override
boolean isStateOfTheWorld() {
boolean isFullStateOfTheWorld() {
return true;
}

Expand Down
7 changes: 6 additions & 1 deletion xds/src/main/java/io/grpc/xds/XdsResourceType.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ abstract class XdsResourceType<T extends ResourceUpdate> {

abstract String typeUrlV2();

abstract boolean isStateOfTheWorld();
// Do not confuse with the SotW approach: it is the mechanism in which the client must specify all
// resource names it is interested in with each request. Different resource types may behave
// differently in this approach. For LDS and CDS resources, the server must return all resources
// that the client has subscribed to in each request. For RDS and EDS, the server may only return
// the resources that need an update.
abstract boolean isFullStateOfTheWorld();

static class Args {
final ServerInfo serverInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ String typeUrlV2() {
}

@Override
boolean isStateOfTheWorld() {
boolean isFullStateOfTheWorld() {
return false;
}

Expand Down