[ 
https://issues.apache.org/jira/browse/ROCKETMQ-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15823398#comment-15823398
 ] 

ASF GitHub Bot commented on ROCKETMQ-37:
----------------------------------------

Github user a2888409 commented on a diff in the pull request:

    https://github.com/apache/incubator-rocketmq/pull/33#discussion_r96159731
  
    --- Diff: 
client/src/main/java/org/apache/rocketmq/client/impl/MQClientManager.java ---
    @@ -53,8 +53,9 @@ public MQClientInstance 
getAndCreateMQClientInstance(final ClientConfig clientCo
                 MQClientInstance prev = 
this.factoryTable.putIfAbsent(clientId, instance);
                 if (prev != null) {
                     instance = prev;
    -            } else {
                     log.warn("Previous MQClientInstance has created for 
clientId:[{}]", clientId);
    +            } else {
    +                log.info("new MQClientInstance has created for 
clientId:[{}]", clientId);
    --- End diff --
    
    thanks, i have fixed it.


> Log output information is not accurate
> --------------------------------------
>
>                 Key: ROCKETMQ-37
>                 URL: https://issues.apache.org/jira/browse/ROCKETMQ-37
>             Project: Apache RocketMQ
>          Issue Type: Improvement
>            Reporter: QianZhenyu
>            Assignee: vongosling
>
> 1. in MQClientManager#getAndCreateMQClientInstance  line 57
> when generate a new key-value pair for client  in factoryTable,   if there 
> was no mapping for the clientId previously, putIfAbsent will return null, and 
> then output:
> "log.warn("Previous MQClientInstance has created for clientId:[{}]", 
> clientId);"
> this is wrong, it should output in condition prev != null
> 2. in SubscriptionGroupManager#deleteSubscriptionGroupConfig  line 187
> if program execute:
> log.warn("delete subscription group failed, subscription group: {} not 
> exist", old);
> variable old is always null , it's useless, so it's better to  print groupName



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to