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:
[email protected]


Reply via email to