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 2021/12/01 13:49:34 UTC

[GitHub] [rocketmq] XiaoyiPeng opened a new issue #3571: For a big set, replace sequential iteration addition with a parallel stream may be better when calculating cumulative result

XiaoyiPeng opened a new issue #3571:
URL: https://github.com/apache/rocketmq/issues/3571


   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
      For a big set, sequential iteration addition might be inefficient, in class `StoreStatsService` as shown below:
   
         ```java
            public long getPutMessageTimesTotal() {
                 long rs = 0;
                 for (LongAdder data : putMessageTopicTimesTotal.values()) {
                     rs += data.longValue();
                 }
                 return rs;
             }
         ```
        Renaming variables lockXXX to xxxLock may be better.(eg: `StoreStatsService#lockPut`)
        
   
   
   2. Please tell us about your environment:
      Mac OS Catalina
   
   


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

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq] duhenglucky closed issue #3571: For a big set, replace sequential iteration addition with a parallel stream may be better when calculating cumulative result

Posted by GitBox <gi...@apache.org>.
duhenglucky closed issue #3571:
URL: https://github.com/apache/rocketmq/issues/3571


   


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

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org