Skip to content

Commit

Permalink
Remove emitting SD event for receiving URI data update (#998)
Browse files Browse the repository at this point in the history
* Remove emitting SD event for receiving URI data update

* update version
  • Loading branch information
bohhyang committed Apr 25, 2024
1 parent 111a065 commit a646a52
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ and what APIs have changed, if applicable.

## [Unreleased]

## [29.53.1] - 2024-04-24
- Remove emitting SD event for receiving URI data update

## [29.53.0] - 2024-04-09
- add xDS server latency metric provider

Expand Down Expand Up @@ -5683,7 +5686,8 @@ patch operations can re-use these classes for generating patch messages.

## [0.14.1]

[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.53.0...master
[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.53.1...master
[29.53.1]: https://github.com/linkedin/rest.li/compare/v29.53.0...v29.53.1
[29.53.0]: https://github.com/linkedin/rest.li/compare/v29.52.1...v29.53.0
[29.52.1]: https://github.com/linkedin/rest.li/compare/v29.52.0...v29.52.1
[29.52.0]: https://github.com/linkedin/rest.li/compare/v29.51.14...v29.52.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -598,14 +598,8 @@ private void emitSDStatusUpdateReceiptEvents(Map<String, XdsAndD2Uris> updates)
MapDifference<String, XdsAndD2Uris> mapDifference = Maps.difference(_currentData, updates);
Map<String, XdsAndD2Uris> markedDownUris = mapDifference.entriesOnlyOnLeft();
Map<String, XdsAndD2Uris> markedUpUris = mapDifference.entriesOnlyOnRight();
Map<String, XdsAndD2Uris> updatedUris = mapDifference.entriesDiffering().entrySet().stream()
.collect(Collectors.toMap(
Map.Entry::getKey,
e -> e.getValue().rightValue() // new data in updated uris
));

emitSDStatusUpdateReceiptEvents(markedUpUris, true, timestamp);
emitSDStatusUpdateReceiptEvents(updatedUris, true, timestamp);
emitSDStatusUpdateReceiptEvents(markedDownUris, false, timestamp);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ public void testListenToNormalUri() throws PropertySerializationException
uriMap.put(URI_NAME, getD2URI(PRIMARY_CLUSTER_NAME, URI_NAME, VERSION_2));
uriMap.put(URI_NAME_3, getD2URI(PRIMARY_CLUSTER_NAME, URI_NAME_3, VERSION));
fixture._uriMapWatcher.onChanged(new XdsClient.D2URIMapUpdate(uriMap));
verify(fixture._eventEmitter).emitSDStatusUpdateReceiptEvent(
// events should be emitted only for remove/add, but not update
verify(fixture._eventEmitter, never()).emitSDStatusUpdateReceiptEvent(
any(), eq(HOST_1), anyInt(), eq(ServiceDiscoveryEventEmitter.StatusUpdateActionType.MARK_READY), anyBoolean(),
any(), any(), any(), eq((int) VERSION_2), any(), anyLong());
verify(fixture._eventEmitter).emitSDStatusUpdateReceiptEvent(
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.53.0
version=29.53.1
group=com.linkedin.pegasus
org.gradle.configureondemand=true
org.gradle.parallel=true
Expand Down

0 comments on commit a646a52

Please sign in to comment.