Skip to content

Commit

Permalink
prevent duplicate uri property update
Browse files Browse the repository at this point in the history
  • Loading branch information
bohhyang committed Jun 6, 2024
1 parent faf30ae commit 9f44f72
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 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.56.1] - 2024-06-06
- prevent duplicate uri property update

## [29.56.0] - 2024-05-30
- degrade hosts for HTTP/2 stream errors in Degrader and Relative LB.

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

## [0.14.1]

[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.56.0...master
[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.56.1...master
[29.56.1]: https://github.com/linkedin/rest.li/compare/v29.56.0...v29.56.1
[29.56.0]: https://github.com/linkedin/rest.li/compare/v29.55.0...v29.56.0
[29.55.0]: https://github.com/linkedin/rest.li/compare/v29.54.0...v29.55.0
[29.54.0]: https://github.com/linkedin/rest.li/compare/v29.53.1...v29.54.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ protected void handlePut(final String cluster, final UriProperties uriProperties
{
String clusterName = uriProperties.getClusterName();

Optional<UriProperties> currentUriProperties = Optional.ofNullable(
_simpleLoadBalancerState.getUriProperties(clusterName)).map(LoadBalancerStateItem::getProperty);
if (currentUriProperties.isPresent() && currentUriProperties.get().equals(uriProperties))
{
_log.debug("For cluster: {}, received duplicate uri properties: {}", clusterName, uriProperties);
return;
}

_log.debug("For cluster: {}, received new uri properties: {}\nOld properties: {}", clusterName, uriProperties,
currentUriProperties);

Set<String> serviceNames = _simpleLoadBalancerState.getServicesPerCluster().get(clusterName);
//updates all the services that these uris provide
if (serviceNames != null)
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.56.0
version=29.56.1
group=com.linkedin.pegasus
org.gradle.configureondemand=true
org.gradle.parallel=true
Expand Down

0 comments on commit 9f44f72

Please sign in to comment.