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/02/24 13:56:19 UTC
[GitHub] [rocketmq] horizonzy commented on a change in pull request #2536: [ISSUE #2535] Use one variable value to log info when eventQueue's size more than 10000.
horizonzy commented on a change in pull request #2536:
URL: https://github.com/apache/rocketmq/pull/2536#discussion_r581977955
##########
File path: remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java
##########
@@ -569,10 +569,11 @@ public void operationComplete(ChannelFuture f) throws Exception {
private final int maxSize = 10000;
public void putNettyEvent(final NettyEvent event) {
- if (this.eventQueue.size() <= maxSize) {
+ int currentSize = this.eventQueue.size();
+ if (currentSize <= maxSize) {
this.eventQueue.add(event);
} else {
- log.warn("event queue size[{}] enough, so drop this event {}", this.eventQueue.size(), event.toString());
+ log.warn("event queue size[{}] enough, so drop this event {}", currentSize, event.toString());
Review comment:
agree
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org