rdhabalia commented on code in PR #3924:
URL: https://github.com/apache/bookkeeper/pull/3924#discussion_r1169471486
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieStateManager.java:
##########
@@ -149,6 +160,30 @@ public Number getSample() {
}
};
statsLogger.registerGauge(SERVER_STATUS, serverStatusGauge);
+ this.serverSanityGauge = new Gauge<Number>() {
+ @Override
+ public Number getDefaultValue() {
+ return -1;
+ }
+
+ @Override
+ public Number getSample() {
+ return sanityPassed.get();
+ }
+ };
+ statsLogger.registerGauge(SERVER_SANITY, serverSanityGauge);
+ stateService.scheduleAtFixedRate(() -> {
+ if (forceReadOnly.get()) {
+ sanityPassed.set(1);
+ return;
+ }
+ SanityTestCommand.handleAsync(conf, new
SanityTestCommand.SanityFlags()).thenAccept(__ -> {
Review Comment:
yes, it's checking at line#176
--
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]