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

A74 subclass move #11923

Draft
wants to merge 44 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
fd069e3
Framework definition to support A74
larry-safran Dec 4, 2024
b2cb05b
Test that update works (with associated fixes)
larry-safran Jan 6, 2025
8e668b5
Cleanup
larry-safran Jan 6, 2025
5b14a3e
Cleanup
larry-safran Jan 6, 2025
5f8d479
Add verification of data changing
larry-safran Jan 7, 2025
ec50490
Support aggregate clusters correctly
larry-safran Jan 7, 2025
5dceeaf
Fix class name referenced in javadoc
larry-safran Jan 7, 2025
fd64f20
Address a number of code review comments and add a test for missing C…
larry-safran Jan 8, 2025
b2e924e
Remove syncContext from watchers. Add checkNotNull, private and fina…
larry-safran Jan 8, 2025
5a75b10
Add a test for corrupt LDS
larry-safran Jan 8, 2025
d3b713f
Change aggregate cluster handling to correctly handle cluster names a…
larry-safran Jan 9, 2025
6089730
Errorprone
larry-safran Jan 9, 2025
d5dea83
Add max recursion limit for clusters to match c++.
larry-safran Jan 14, 2025
28d29fb
Fix handling of route and cluster updates.
larry-safran Jan 15, 2025
4a53fce
Make data private and XdsWatcherBase static
larry-safran Jan 15, 2025
c97118f
In LDS onChanged(), get old activeVirtualHost before possibly doing c…
larry-safran Jan 16, 2025
06466fc
Change comment for clarity
larry-safran Jan 16, 2025
b898e34
Allow EdsWatcher to have multiple CdsWatcher parents
larry-safran Jan 16, 2025
954ced3
Allow EdsWatcher to have multiple CdsWatcher parents
larry-safran Jan 16, 2025
ef13712
Fully support inlined RouteConfig
larry-safran Jan 17, 2025
518cef1
Add lots of `checkNotNull()`
larry-safran Jan 17, 2025
68071e6
Add test case testMultipleParentsInCdsTree, make a couple of cluster …
larry-safran Jan 18, 2025
f99fc56
Add test case testMultipleParentsInCdsTree, make a couple of cluster …
larry-safran Jan 18, 2025
482cd9d
Add virtual host to XdsConfig as per spec
larry-safran Jan 21, 2025
36602b6
Eliminate clusterSubscriptions and use objects directly instead of st…
larry-safran Feb 1, 2025
7042ed9
Add tests. Fix some places that were still using string instead of o…
larry-safran Feb 5, 2025
7ab45bb
core: Alternate ipV4 and ipV6 addresses for Happy Eyeballs in PickFir…
larry-safran Jan 14, 2025
f2701d9
interop-testing: fix peer extraction issue in soak test iterations
zbilun Jan 14, 2025
8b4391f
interop-testing: Move soak out of AbstractInteropTest
ejona86 Jan 14, 2025
42270da
stub: Eliminate invalid test cases where different threads were calli…
larry-safran Jan 15, 2025
ae0fa25
xds: Envoy proto sync to 2024-11-11 (#11816)
shivaspeaks Jan 17, 2025
bdf6987
compiler: Prepare for C++ protobuf using string_view
ejona86 Jan 15, 2025
31966be
Update README etc to reference 1.69.1
ejona86 Jan 16, 2025
d4e5064
xds: Rename grpc.xds.cluster to grpc.lb.backend_service
ejona86 Jan 18, 2025
27e32b1
xds: Fix fallback test FakeClock TSAN failure
ejona86 Jan 22, 2025
9efd2f2
xds: Include max concurrent request limit in the error status for con…
kannanjgithub Jan 23, 2025
e6503ff
Much progress in A74 using DependencyManager
larry-safran Jan 31, 2025
0ba5c84
Merge with master
larry-safran Feb 24, 2025
86ea936
Merge with master
larry-safran Feb 25, 2025
d72d674
Handle Logical DNS clusters
larry-safran Feb 27, 2025
5f4813d
don't publish if any logical dns clusters are still unresolved.
larry-safran Feb 27, 2025
7e32c0a
Fix tests and some underlying bugs
larry-safran Feb 28, 2025
3569db8
Fix tests and some underlying bugs
larry-safran Mar 1, 2025
9c896a2
Fix tests and some underlying bugs
larry-safran Mar 1, 2025
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
Next Next commit
Add max recursion limit for clusters to match c++.
larry-safran committed Jan 14, 2025
commit d5dea8342b16ae4f33e6807b77817f9304627c17
24 changes: 17 additions & 7 deletions xds/src/main/java/io/grpc/xds/XdsDependencyManager.java
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ final class XdsDependencyManager implements XdsConfig.XdsClusterSubscriptionRegi
public static final XdsClusterResource CLUSTER_RESOURCE = XdsClusterResource.getInstance();
public static final String TOP_CDS_CONTEXT = toContextStr(CLUSTER_RESOURCE.typeName(), "");
public static final XdsEndpointResource ENDPOINT_RESOURCE = XdsEndpointResource.getInstance();
public static final String CLUSTER_TYPE = XdsClusterResource.getInstance().typeName();
private static final int MAX_CLUSTER_RECURSION_DEPTH = 16; // Matches core
private final XdsClient xdsClient;
private final XdsConfigWatcher xdsConfigWatcher;
private final SynchronizationContext syncContext;
@@ -94,7 +94,7 @@ public Closeable subscribeToCluster(String clusterName) {
Set<ClusterSubscription> localSubscriptions =
clusterSubscriptions.computeIfAbsent(clusterName, k -> new HashSet<>());
localSubscriptions.add(subscription);
addWatcher(new CdsWatcher(clusterName, TOP_CDS_CONTEXT));
addWatcher(new CdsWatcher(clusterName, TOP_CDS_CONTEXT, 1));
});

return subscription;
@@ -485,11 +485,11 @@ List<String> getCdsNames() {
}

private class CdsWatcher extends XdsWatcherBase<XdsClusterResource.CdsUpdate> {
List<String> parentContexts = new ArrayList<>();
Map<String, Integer> parentContexts = new HashMap<>();

CdsWatcher(String resourceName, String parentContext) {
CdsWatcher(String resourceName, String parentContext, int depth) {
super(CLUSTER_RESOURCE, resourceName);
this.parentContexts.add(parentContext);
this.parentContexts.put(parentContext, depth);
}

@Override
@@ -518,11 +518,21 @@ public void onChanged(XdsClusterResource.CdsUpdate update) {

Set<String> addedClusters = Sets.difference(newNames, oldNames);
Set<String> deletedClusters = Sets.difference(oldNames, newNames);
addedClusters.forEach((cluster) -> addWatcher(new CdsWatcher(cluster, parentContext)));
int depth = parentContexts.values().stream().max(Integer::compare).orElse(0) + 1;
if (depth > MAX_CLUSTER_RECURSION_DEPTH) {
logger.log(XdsLogger.XdsLogLevel.WARNING,
"Cluster recursion depth limit exceeded for cluster {0}", resourceName());
Status error = Status.UNAVAILABLE.withDescription(
"aggregate cluster graph exceeds max depth");
data = StatusOr.fromStatus(error);
throw error.asRuntimeException();
}
addedClusters.forEach(
(cluster) -> addWatcher(new CdsWatcher(cluster, parentContext, depth)));
deletedClusters.forEach((cluster)
-> cancelClusterWatcherTree(getCluster(cluster), parentContext));

if (!addedClusters.isEmpty()) {
if (addedClusters.isEmpty()) {
maybePublishConfig();
}
} else {