Skip to content

Commit

Permalink
fix some comment
Browse files Browse the repository at this point in the history
  • Loading branch information
congbo committed May 6, 2024
1 parent b4a7b44 commit 315b4af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void setSessionStateListener(SessionStateListener sessionStateListener) {
});
}

public CompletableFuture<Boolean> isMetadataServiceAvailable() {
public synchronized CompletableFuture<Boolean> isMetadataServiceAvailable() {
return CompletableFuture.completedFuture(metadataServiceAvailable);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ protected void initialize(AbstractConfiguration<?> conf,
.operationRetryPolicy(zkRetryPolicy)
.requestRateLimit(conf.getZkRequestRateLimit())
.watchers(Collections.singleton(watchedEvent -> {
log.info("Got ZK session watch event: {}", watchedEvent);
if (log.isDebugEnabled()) {
log.debug("Got ZK session watch event: {}", watchedEvent);
}
handleState(watchedEvent.getState());
}))
.statsLogger(statsLogger)
Expand Down Expand Up @@ -265,7 +267,6 @@ private synchronized void handleState(Watcher.Event.KeeperState zkClientState) {

default:
this.metadataServiceAvailable = true;
break;
}
}

Expand Down

0 comments on commit 315b4af

Please sign in to comment.