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
Signed-off-by: crazyhzm <[email protected]>
  • Loading branch information
CrazyHZM committed Apr 18, 2024
1 parent 2ad93e1 commit c90c00a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,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 (isParallelCheck()) {
CountDownLatch countDownLatch = new CountDownLatch(healthCheckers.size());
CountDownLatch countDownLatch = new CountDownLatch(readinessHealthCheckers.size());
AtomicBoolean parallelResult = new AtomicBoolean(true);
healthCheckers.forEach((String key, HealthChecker value) -> healthCheckExecutor.execute(() -> {
readinessHealthCheckers.forEach((String key, HealthChecker value) -> healthCheckExecutor.execute(() -> {
try {
if (!doHealthCheck(key, value, false, healthMap, true, false)) {
parallelResult.set(false);
Expand Down

0 comments on commit c90c00a

Please sign in to comment.