From e949cf132d4282f86d1e6ccc074bf45458de64c3 Mon Sep 17 00:00:00 2001 From: Bohan Yang Date: Thu, 7 Dec 2023 09:17:13 -0800 Subject: [PATCH] correct where to increment the clusterNotFound count and adjust quarantine log level (#950) --- CHANGELOG.md | 6 +++++- .../com/linkedin/d2/balancer/simple/SimpleLoadBalancer.java | 2 +- .../d2/balancer/strategies/LoadBalancerQuarantine.java | 6 ++++-- gradle.properties | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 989bf3727b..fe9bd30029 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ and what APIs have changed, if applicable. ## [Unreleased] +## [29.48.4] - 2023-12-06 +- correct where to increment the clusterNotFound count and adjust quarantine log level + ## [29.48.3] - 2023-11-28 - Add standardized models for cursor based pagination @@ -5572,7 +5575,8 @@ patch operations can re-use these classes for generating patch messages. ## [0.14.1] -[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.48.3...master +[Unreleased]: https://github.com/linkedin/rest.li/compare/v29.48.4...master +[29.48.4]: https://github.com/linkedin/rest.li/compare/v29.48.3...v29.48.4 [29.48.3]: https://github.com/linkedin/rest.li/compare/v29.48.2...v29.48.3 [29.48.2]: https://github.com/linkedin/rest.li/compare/v29.48.1...v29.48.2 [29.48.1]: https://github.com/linkedin/rest.li/compare/v29.48.0...v29.48.1 diff --git a/d2/src/main/java/com/linkedin/d2/balancer/simple/SimpleLoadBalancer.java b/d2/src/main/java/com/linkedin/d2/balancer/simple/SimpleLoadBalancer.java index ea6db1678f..0119ea181f 100644 --- a/d2/src/main/java/com/linkedin/d2/balancer/simple/SimpleLoadBalancer.java +++ b/d2/src/main/java/com/linkedin/d2/balancer/simple/SimpleLoadBalancer.java @@ -820,7 +820,6 @@ public void getLoadBalancedClusterAndUriProperties(String clusterName, @Override public void onError(Throwable e) { - _clusterNotFoundStats.inc(); finalCallback.onError(new ServiceUnavailableException(clusterName, "PEGA_1011. " + e.getMessage(), e)); } @@ -849,6 +848,7 @@ public void getLoadBalancedClusterAndUriProperties(String clusterName, boolean w { warn(_log, "unable to find cluster: ", clusterName); + _clusterNotFoundStats.inc(); die(pairCallback, clusterName, "PEGA_1012. no cluster properties in lb state"); return; } diff --git a/d2/src/main/java/com/linkedin/d2/balancer/strategies/LoadBalancerQuarantine.java b/d2/src/main/java/com/linkedin/d2/balancer/strategies/LoadBalancerQuarantine.java index be5efa8fe1..4a4c177849 100644 --- a/d2/src/main/java/com/linkedin/d2/balancer/strategies/LoadBalancerQuarantine.java +++ b/d2/src/main/java/com/linkedin/d2/balancer/strategies/LoadBalancerQuarantine.java @@ -241,8 +241,10 @@ public boolean checkUpdateQuarantineState() // Nothing to do for now. Just keep waiting if (_timeTilNextCheck > ERROR_REPORT_PERIOD) { - _rateLimitedLogger.error("Client {} for service {} is being kept in quarantine for {} seconds, " - + "Please check to make sure it is healthy", _trackerClient.getUri(), _serviceName, (1.0 *_timeTilNextCheck / 1000)); + _rateLimitedLogger.info("Host {} for service {} is being kept in quarantine for {} seconds, " + + "This is a capacity loss and could potentially cause availability issue. Please contact the service owner to" + + " make sure the host is healthy, if needed", _trackerClient.getUri(), _serviceName, + (1.0 *_timeTilNextCheck / 1000)); } break; case SUCCESS: diff --git a/gradle.properties b/gradle.properties index 3ee0a628a2..09251fbf4c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -version=29.48.3 +version=29.48.4 group=com.linkedin.pegasus org.gradle.configureondemand=true org.gradle.parallel=true