You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
horizonzy
added a commit
to horizonzy/rocketmq
that referenced
this issue
Dec 30, 2020
* [ISSUE apache#2535] Use one variable value to log info when eventQueue's size more than 10000.
* add the queue limit value when evenQueue size is enough.
* [ISSUE apache#2535] Use one variable value to log info when eventQueue's size more than 10000.
* add the queue limit value when evenQueue size is enough.
BUG REPORT
I notice the code in
NettyEventExecutor
as follow: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.
The text was updated successfully, but these errors were encountered: