gaozhangmin commented on code in PR #3778:
URL: https://github.com/apache/bookkeeper/pull/3778#discussion_r1135045881


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/TriggerGCService.java:
##########
@@ -71,7 +71,28 @@ public HttpServiceResponse handle(HttpServiceRequest 
request) throws Exception {
                 Map<String, Object> configMap = JsonUtil.fromJson(requestBody, 
HashMap.class);
                 Boolean forceMajor = (Boolean) 
configMap.getOrDefault("forceMajor", null);
                 Boolean forceMinor = (Boolean) 
configMap.getOrDefault("forceMinor", null);
-                
bookieServer.getBookie().getLedgerStorage().forceGC(forceMajor, forceMinor);
+                Double majorCompactionThreshold = (Double) 
configMap.getOrDefault("majorCompactionThreshold",
+                        conf.getMajorCompactionThreshold());
+                Double minorCompactionThreshold = (Double) 
configMap.getOrDefault("minorCompactionThreshold",
+                        conf.getMinorCompactionThreshold());
+                Long majorCompactionMaxTimeMillis =  configMap.get(
+                        "majorCompactionMaxTimeMillis") == null ? 
conf.getMajorCompactionMaxTimeMillis()
+                        : Long.valueOf((Integer) 
configMap.get("majorCompactionMaxTimeMillis"));
+                Long minorCompactionMaxTimeMillis =  configMap.get(

Review Comment:
   Why ? it's  not a scheduled task. 



##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/TriggerGCService.java:
##########
@@ -71,7 +71,28 @@ public HttpServiceResponse handle(HttpServiceRequest 
request) throws Exception {
                 Map<String, Object> configMap = JsonUtil.fromJson(requestBody, 
HashMap.class);
                 Boolean forceMajor = (Boolean) 
configMap.getOrDefault("forceMajor", null);
                 Boolean forceMinor = (Boolean) 
configMap.getOrDefault("forceMinor", null);
-                
bookieServer.getBookie().getLedgerStorage().forceGC(forceMajor, forceMinor);
+                Double majorCompactionThreshold = (Double) 
configMap.getOrDefault("majorCompactionThreshold",
+                        conf.getMajorCompactionThreshold());
+                Double minorCompactionThreshold = (Double) 
configMap.getOrDefault("minorCompactionThreshold",
+                        conf.getMinorCompactionThreshold());
+                Long majorCompactionMaxTimeMillis =  configMap.get(
+                        "majorCompactionMaxTimeMillis") == null ? 
conf.getMajorCompactionMaxTimeMillis()
+                        : Long.valueOf((Integer) 
configMap.get("majorCompactionMaxTimeMillis"));
+                Long minorCompactionMaxTimeMillis =  configMap.get(

Review Comment:
   Why ? it's  not a scheduled task.   @hangc0276 
   



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