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 2020/09/01 11:13:53 UTC

[GitHub] [rocketmq] liqianggh opened a new pull request #2284: CodeStyle: fix the spelling mistake in ProducerManager & some code optimization

liqianggh opened a new pull request #2284:
URL: https://github.com/apache/rocketmq/pull/2284


   ## What is the purpose of the change
   spelling mistake  and code optimization
   
   ## Brief changelog
   
   1. change the method name from "getAvaliableChannel" to "getAvailableChannel"
   2. change the field name from "GET_AVALIABLE_CHANNEL_RETRY_COUNT" to "GET_AVAILABLE_CHANNEL_RETRY_COUNT"
   3. optimizing “getAvailableChannel” 
   `      List<Channel> channelList = new ArrayList<Channel>();
           ConcurrentHashMap<Channel, ClientChannelInfo> channelClientChannelInfoHashMap = groupChannelTable.get(groupId);
           if (channelClientChannelInfoHashMap != null) {
               for (Channel channel : channelClientChannelInfoHashMap.keySet()) {
                   channelList.add(channel);
               }
           } else {
               log.warn("Check transaction failed, channel table is empty. groupId={}", groupId);
               return null;
           }`
   
   with
   `     List<Channel> channelList;
           ConcurrentHashMap<Channel, ClientChannelInfo> channelClientChannelInfoHashMap = groupChannelTable.get(groupId);
           if (channelClientChannelInfoHashMap != null) {
               channelList = new ArrayList<>(channelClientChannelInfoHashMap.keySet());
           } else {
               log.warn("Check transaction failed, channel table is empty. groupId={}", groupId);
               return null;
           }`


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



[GitHub] [rocketmq] RongtongJin merged pull request #2284: [ISSUE #2283] Fix the spelling mistake in ProducerManager & some code optimization(CodeStyle)

Posted by GitBox <gi...@apache.org>.
RongtongJin merged pull request #2284:
URL: https://github.com/apache/rocketmq/pull/2284


   


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



[GitHub] [rocketmq] coveralls commented on pull request #2284: [ISSUE #2283] Fix the spelling mistake in ProducerManager & some code optimization(CodeStyle)

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #2284:
URL: https://github.com/apache/rocketmq/pull/2284#issuecomment-684837758


   
   [![Coverage Status](https://coveralls.io/builds/33144270/badge)](https://coveralls.io/builds/33144270)
   
   Coverage increased (+0.05%) to 51.347% when pulling **dad34ec6d23c54126964d8e42d8f695e105445b6 on liqianggh:master** into **9f95a972e10e0681bc3f2d00e9957aa212e897b5 on apache:master**.
   


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