lordcheng10 commented on a change in pull request #2947:
URL: https://github.com/apache/bookkeeper/pull/2947#discussion_r783946785
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java
##########
@@ -616,6 +617,23 @@ public void safeRun() {
void checkForFaultyBookies() {
List<BookieId> faultyBookies = bookieClient.getFaultyBookies();
+ if (faultyBookies.isEmpty()) {
+ return;
+ }
+
+ boolean isEnable = false;
+ try {
+ isEnable = metadataDriver.isHealthCheckEnabled().get();
+ } catch (InterruptedException e) {
+ LOG.error("isHealthCheckEnabled throw InterruptedException", e);
+ } catch (ExecutionException e) {
+ LOG.error("isHealthCheckEnabled throw ExecutionException", e);
Review comment:
OK I will fix
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/MetadataBookieDriver.java
##########
@@ -68,6 +71,31 @@ LedgerManagerFactory getLedgerManagerFactory()
*/
LayoutManager getLayoutManager();
+ /**
+ * Return health check is enable or disable.
+ *
+ * @return true if health check is enable, otherwise false.
+ */
+ default CompletableFuture<Boolean> isHealthCheckEnabled() {
+ return FutureUtils.value(true);
+ }
+
+ /**
+ * Disable health check.
+ */
+ default CompletableFuture<Void> disableHealthCheck() {
+ CompletableFuture<Void> result = new CompletableFuture<>();
+ result.completeExceptionally(new Exception("Not support
disableHealthCheck"));
Review comment:
OK I will fix
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]