ZhangShenao opened a new issue #700: Potential Concurrent Risk in 
RouteInfoManager
URL: https://github.com/apache/rocketmq/issues/700
 
 
   The method scanNotActiveBroker() in RouteInfoManager : 
   `public void scanNotActiveBroker() {
           Iterator<Entry<String, BrokerLiveInfo>> it = 
this.brokerLiveTable.entrySet().iterator();
           while (it.hasNext()) {
               Entry<String, BrokerLiveInfo> next = it.next();
               long last = next.getValue().getLastUpdateTimestamp();
               if ((last + BROKER_CHANNEL_EXPIRED_TIME) < 
System.currentTimeMillis()) {
                   RemotingUtil.closeChannel(next.getValue().getChannel());
                   it.remove();
                   log.warn("The broker channel expired, {} {}ms", 
next.getKey(), BROKER_CHANNEL_EXPIRED_TIME);
                   this.onChannelDestroy(next.getKey(), 
next.getValue().getChannel());
               }
           }
       }`
   Is there any Concurrent Risk when it.remove() without lock?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to