You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/11/24 06:14:32 UTC

[GitHub] [rocketmq] odbozhou commented on a change in pull request #3526: [ISSUE #3525] Avoid Broker from printing too many pop-related logs when enablePopLos is false

odbozhou commented on a change in pull request #3526:
URL: https://github.com/apache/rocketmq/pull/3526#discussion_r755728283



##########
File path: broker/src/main/java/org/apache/rocketmq/broker/processor/PopReviveService.java
##########
@@ -218,8 +220,10 @@ public PullResult getMessage(String group, String topic, int queueId, long offse
                 case OFFSET_OVERFLOW_ONE:
                 case OFFSET_TOO_SMALL:
                     pullStatus = PullStatus.OFFSET_ILLEGAL;
-                    POP_LOGGER.warn("offset illegal. GetMessageStatus={}, topic={}, groupId={}, requestOffset={}",
-                            getMessageResult.getStatus(), topic, group, offset);
+                    if (brokerController.getBrokerConfig().isEnablePopLog()) {
+                        POP_LOGGER.warn("offset illegal. GetMessageStatus={}, topic={}, groupId={}, requestOffset={}",

Review comment:
       The warn log is necessary, it may be some abnormal scenarios

##########
File path: broker/src/main/java/org/apache/rocketmq/broker/processor/PopBufferMergeService.java
##########
@@ -442,7 +442,9 @@ public boolean addCk(PopCheckPoint point, int reviveQueueId, long reviveQueueOff
         }
 
         if (this.counter.get() > brokerController.getBrokerConfig().getPopCkMaxBufferSize()) {
-            POP_LOGGER.warn("[PopBuffer]add ck, max size, {}, {}", point, this.counter.get());
+            if (brokerController.getBrokerConfig().isEnablePopLog()) {
+                POP_LOGGER.warn("[PopBuffer]add ck, max size, {}, {}", point, this.counter.get());

Review comment:
       warn log is necessary




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

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