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

    https://github.com/apache/storm/pull/753#discussion_r40847090
  
    --- Diff: storm-core/src/jvm/backtype/storm/utils/RateTracker.java ---
    @@ -72,7 +80,7 @@ public RateTracker(int validTimeWindowInMils, int 
numOfSlides, boolean simulate
          * @param count number of arrivals
          */
         public void notify(long count) {
    -        _histograms[_histograms.length-1]+=count;
    +        _histograms[_numOfSlides - 1] += count;
    --- End diff --
    
    I don't think this is thread safe.  I'm not sure that is a big deal for 
this code, as I am not aware of any spouts that emit from multiple threads 
ignoring the call to nextTuple.  But we should file a JIRA at least to fix it 
because the disruptor code calls it from multiple threads, and the counts will 
get off.


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