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

    https://github.com/apache/activemq-artemis/pull/960#discussion_r96232634
  
    --- Diff: 
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
 ---
    @@ -3128,6 +3128,9 @@ private SlowConsumerReaperRunnable(long checkPeriod, 
float threshold, SlowConsum
     
           @Override
           public void run() {
    +         if (getConsumerCount() == 0) {
    --- End diff --
    
    Can you remove this? this is a useless statement here.
    you will be counting the number of elements on consumerSet once, for than 
later perform a for (Consumer consumer : getConsumerSet()) that will perform 
the very same operation. It is duplicating effort for no improvement IMO.
    
    
    If you are having a race condition shown by a test, then it's a different 
issue that we must investigate, this would only hide the real issue if that was 
the case.


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