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

Respect glob collection subscriptions on reconnect #1011

Merged
merged 5 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ and what APIs have changed, if applicable.

## [Unreleased]

## [29.58.5] - 2024-09-04
- Respect glob collection subscriptions on reconnect

## [29.58.4] - 2024-09-03
- Respect `startPublishing` call by always re-notifying watcher in XdsClientImpl

## [29.58.3] - 2024-08-12
- Disable the warmUp flaky unit test
Expand Down Expand Up @@ -5721,7 +5725,8 @@ patch operations can re-use these classes for generating patch messages.

## [0.14.1]

[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.58.4...master
[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.58.5...master
[29.58.5]: https://github.com/linkedin/rest.li/compare/v29.58.4...v29.58.5
[29.58.4]: https://github.com/linkedin/rest.li/compare/v29.58.3...v29.58.4
[29.58.3]: https://github.com/linkedin/rest.li/compare/v29.58.2...v29.58.3
[29.58.2]: https://github.com/linkedin/rest.li/compare/v29.58.1...v29.58.2
Expand Down
20 changes: 14 additions & 6 deletions d2/src/main/java/com/linkedin/d2/xds/XdsClientImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -695,11 +695,19 @@ final class RpcRetryTask implements Runnable {
public void run() {
startRpcStreamLocal();
for (ResourceType type : ResourceType.values()) {
Map<String, ResourceSubscriber> subscriberMap = getResourceSubscriberMap(type);
Collection<String> resources = subscriberMap.isEmpty() ? null : subscriberMap.keySet();
if (resources != null) {
_adsStream.sendDiscoveryRequest(type, resources);
Collection<String> resources = getResourceSubscriberMap(type).keySet();
if (resources.isEmpty())
{
continue;
}
if (_subscribeToUriGlobCollection && type == ResourceType.D2_URI_MAP)
{
resources = resources.stream()
.map(GlobCollectionUtils::globCollectionUrlForClusterResource)
.collect(Collectors.toSet());
type = ResourceType.D2_URI;
}
_adsStream.sendDiscoveryRequest(type, resources);
}
}
}
Expand Down Expand Up @@ -936,8 +944,8 @@ public void onCompleted()
private void sendDiscoveryRequest(ResourceType type, Collection<String> resources)
{
_log.info("Sending {} request for resources: {}", type, resources);
DiscoveryRequestData request = new DiscoveryRequestData(_node, type, resources);
_requestWriter.onNext(request.toEnvoyProto());
DeltaDiscoveryRequest request = new DiscoveryRequestData(_node, type, resources).toEnvoyProto();
_requestWriter.onNext(request);
_log.debug("Sent DiscoveryRequest\n{}", request);
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=29.58.4
version=29.58.5
group=com.linkedin.pegasus
org.gradle.configureondemand=true
org.gradle.parallel=true
Expand Down
Loading