KiteSoar commented on code in PR #9162:
URL: https://github.com/apache/rocketmq/pull/9162#discussion_r1963531027


##########
broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:
##########
@@ -245,9 +252,11 @@ public class AdminBrokerProcessor implements 
NettyRequestProcessor {
     protected final BrokerController brokerController;
     protected Set<String> configBlackList = new HashSet<>();
     private final ExecutorService asyncExecuteWorker = new 
ThreadPoolExecutor(0, 4, 60L, TimeUnit.SECONDS, new SynchronousQueue<>());
+    private final AdminAsyncTaskManager asyncTaskManager;
 
     public AdminBrokerProcessor(final BrokerController brokerController) {
         this.brokerController = brokerController;
+        this.asyncTaskManager = new 
AdminAsyncTaskManager(brokerController.getBrokerConfig());

Review Comment:
   done. The default setting is off.



##########
broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:
##########
@@ -485,17 +496,21 @@ private RemotingCommand 
updateAndGetGroupForbidden(ChannelHandlerContext ctx, Re
     }
 
     private RemotingCommand checkRocksdbCqWriteProgress(ChannelHandlerContext 
ctx, RemotingCommand request) {
-        CheckRocksdbCqWriteResult result = new CheckRocksdbCqWriteResult();
-        
result.setCheckStatus(CheckRocksdbCqWriteResult.CheckStatus.CHECK_IN_PROGRESS.getValue());
-        Runnable runnable = () -> {
+        CompletableFuture<CheckRocksdbCqWriteResult> future = 
CompletableFuture.supplyAsync(() -> {
             try {
                 CheckRocksdbCqWriteResult checkResult = 
doCheckRocksdbCqWriteProgress(ctx, request);
                 LOGGER.info("checkRocksdbCqWriteProgress result: {}", 
JSON.toJSONString(checkResult));
+                return checkResult;
             } catch (Exception e) {
-                LOGGER.error("checkRocksdbCqWriteProgress error", e);
+                throw new CompletionException(e);

Review Comment:
   done



-- 
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: commits-unsubscr...@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to