Skip to content

Commit

Permalink
Fix readiness health check list mistake in parallel checking scenario (
Browse files Browse the repository at this point in the history
…#1309)

Signed-off-by: crazyhzm <[email protected]>
  • Loading branch information
CrazyHZM authored Apr 22, 2024
1 parent 2c4ea18 commit e36ebc5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ public boolean readinessHealthCheck(Map<String, Health> healthMap) {
String checkComponentNames = readinessHealthCheckers.values().stream()
.map(HealthChecker::getComponentName).collect(Collectors.joining(","));
logger.info("SOFABoot HealthChecker readiness check {} item: {}.",
healthCheckers.size(), checkComponentNames);
readinessHealthCheckers.size(), checkComponentNames);
boolean result;
if (healthCheckProperties.isHealthCheckParallelEnable()) {
CountDownLatch countDownLatch = new CountDownLatch(healthCheckers.size());
CountDownLatch countDownLatch = new CountDownLatch(readinessHealthCheckers.size());
AtomicBoolean parallelResult = new AtomicBoolean(true);
healthCheckers.forEach((String key, HealthChecker value) -> healthCheckExecutor.executeTask(() -> {
readinessHealthCheckers.forEach((String key, HealthChecker value) -> healthCheckExecutor.executeTask(() -> {
try {
if (!doHealthCheck(key, value, false, healthMap, true, false)) {
parallelResult.set(false);
Expand Down

0 comments on commit e36ebc5

Please sign in to comment.