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

    https://github.com/apache/incubator-rocketmq/pull/60#discussion_r102897698
  
    --- Diff: 
client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java 
---
    @@ -46,7 +46,7 @@
         private final TreeMap<Long, MessageExt> msgTreeMap = new TreeMap<Long, 
MessageExt>();
         private final AtomicLong msgCount = new AtomicLong();
         private final Lock lockConsume = new ReentrantLock();
    -    private final TreeMap<Long, MessageExt> msgTreeMapTemp = new 
TreeMap<Long, MessageExt>();
    +    private final TreeMap<Long, MessageExt> consumingMsgOrderlyTreeMap = 
new TreeMap<Long, MessageExt>();//subset of msgTreeMap, used when consume 
orderly
    --- End diff --
    
    I do not change anything except the variable, this PR is to solve that it 
is very hard to know what's the purpose of `msgTreeMapTemp `, when I review the 
code, I think it is only for order service, so I rename the field.
    
    The difference between `msgTreeMap` and `consumingMsgOrderlyTreeMap` is 
that , `consumingMsgOrderlyTreeMap` is the subset of `msgTreeMap` when using 
consumeOrderlyService , msg will only be putinto `consumingMsgOrderlyTreeMap` 
when they are ready to submit to thread pool.
    
    Actually it takes me more than ten minutes to figure out that, that's why I 
issue this pr.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to