lhotari commented on code in PR #4727:
URL: https://github.com/apache/bookkeeper/pull/4727#discussion_r2929533507


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ClientConfiguration.java:
##########
@@ -1456,6 +1457,28 @@ public ClientConfiguration 
setBookieErrorThresholdPerInterval(long thresholdPerI
         return this;
     }
 
+
+    /**
+     * Set if count the bookie connecting error into the quarantine condition. 
If this is enabled, the connection
+     * error will be counted into the BookieErrorThresholdPerInterval. So be 
careful to set the quarantine time.
+     *
+     * @param enabled
+     * @return
+     */
+    public ClientConfiguration 
setBookieConnectingErrorCountedIntoQuarantine(boolean enabled) {
+        setProperty(BOOKIE_CONNECTING_ERROR_COUNTED_INTO_QUARANTINE, enabled);
+        return this;
+    }
+
+    /**
+     * Get if count the bookie connecting error into the quarantine condition.
+     *
+     * @return
+     */
+    public boolean getBookieConnectingErrorCountedIntoQuarantine() {
+        return getBoolean(BOOKIE_CONNECTING_ERROR_COUNTED_INTO_QUARANTINE);

Review Comment:
   Default value should be provided as the 2nd argument, for example 
`getBoolean(BOOKIE_CONNECTING_ERROR_QUARANTINE_ENABLED, false)` (example with 
the suggested name of the config)



##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ClientConfiguration.java:
##########
@@ -140,6 +140,7 @@ public class ClientConfiguration extends 
AbstractConfiguration<ClientConfigurati
     protected static final String BOOKIE_ERROR_THRESHOLD_PER_INTERVAL = 
"bookieErrorThresholdPerInterval";
     protected static final String BOOKIE_QUARANTINE_TIME_SECONDS = 
"bookieQuarantineTimeSeconds";
     protected static final String BOOKIE_QUARANTINE_RATIO = 
"bookieQuarantineRatio";
+    protected static final String 
BOOKIE_CONNECTING_ERROR_COUNTED_INTO_QUARANTINE = 
"bookieConnectingErrorCountedIntoQuarantine";

Review Comment:
   Could we call this `bookieConnectionErrorQuarantineEnabled` instead? The 
"counted into" part is slightly confusing.
   
   ```suggestion
       protected static final String BOOKIE_CONNECTING_ERROR_QUARANTINE_ENABLED 
= "bookieConnectionErrorQuarantineEnabled";
   ```



-- 
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]

Reply via email to