horizonzy opened a new issue #2535:
URL: https://github.com/apache/rocketmq/issues/2535


   **BUG REPORT**
   
   1. Please describe the issue you observed:
   I notice the code in `NettyEventExecutor` as follow:
   ```
       class NettyEventExecutor extends ServiceThread {
           private final LinkedBlockingQueue<NettyEvent> eventQueue = new 
LinkedBlockingQueue<NettyEvent>();
           private final int maxSize = 10000;
   
           public void putNettyEvent(final NettyEvent event) {
               if (this.eventQueue.size() <= maxSize) {
                   this.eventQueue.add(event);
               } else {
                   log.warn("event queue size[{}] enough, so drop this event 
{}", this.eventQueue.size(), event.toString());
               }
           }
        ......
       }
   ```
   When the eventQueue.size() more than 10000, the event will be discard, then 
log info.
   Because the putNettyEvent is not sync, so the eventQueue can more than 
10000, when putEvent to queue, the size more than 10000. And when log info,  
the size may less than 10000.
   
   It should use one variable value to log it.
   
   
   
   


----------------------------------------------------------------
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