hangc0276 commented on code in PR #4645:
URL: https://github.com/apache/bookkeeper/pull/4645#discussion_r2247187257


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/ScanAndCompareGarbageCollector.java:
##########
@@ -153,6 +156,7 @@ public void gc(GarbageCleaner garbageCleaner) {
             Versioned<LedgerMetadata> metadata = null;
             while (!done) {
                 start = end + 1;
+                gcRateLimiter.tryAcquire();

Review Comment:
   You are not checking the `tryAcquire()` result, and 
`gcRateLimiter.tryAcquire();` changed nothing, so it cannot block the ZK 
requests.



##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/conf/ServerConfiguration.java:
##########
@@ -114,6 +114,7 @@ public class ServerConfiguration extends 
AbstractConfiguration<ServerConfigurati
     protected static final String GC_OVERREPLICATED_LEDGER_WAIT_TIME = 
"gcOverreplicatedLedgerWaitTime";
     protected static final String 
GC_OVERREPLICATED_LEDGER_MAX_CONCURRENT_REQUESTS =
             "gcOverreplicatedLedgerMaxConcurrentRequests";
+    protected static final String GC_RATE_LIMIT = "gcRateLimit";

Review Comment:
   The configuration name is confusing.



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