You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "crzbird (via GitHub)" <gi...@apache.org> on 2023/03/24 02:53:45 UTC

[GitHub] [rocketmq] crzbird commented on a diff in pull request #6457: [ISSUE #6456] Fix ConsumeMessageService#updateCorePoolSize: Can not i…

crzbird commented on code in PR #6457:
URL: https://github.com/apache/rocketmq/pull/6457#discussion_r1147067386


##########
client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:
##########
@@ -105,9 +105,11 @@ public void shutdown(long awaitTerminateMillis) {
 
     @Override
     public void updateCorePoolSize(int corePoolSize) {
-        if (corePoolSize > 0
-            && corePoolSize <= Short.MAX_VALUE
-            && corePoolSize < this.defaultMQPushConsumer.getConsumeThreadMax()) {
+        if (corePoolSize > 0 && corePoolSize != this.consumeExecutor.getCorePoolSize()
+                && corePoolSize <= Short.MAX_VALUE) {
+            if (corePoolSize > this.consumeExecutor.getMaximumPoolSize()) {
+                this.consumeExecutor.setMaximumPoolSize(corePoolSize);
+            }

Review Comment:
   Do you mean if input corePoolSize > this.consumeExecutor.getMaximumPoolSize() then return , not to update maximumPoolSize?



-- 
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-unsubscribe@rocketmq.apache.org

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