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

    https://github.com/apache/metron/pull/977#discussion_r178600386
  
    --- Diff: 
metron-analytics/metron-profiler/src/main/java/org/apache/metron/profiler/bolt/ProfileBuilderBolt.java
 ---
    @@ -339,11 +362,13 @@ private void handleMessage(Tuple input) {
         Long timestamp = getField(TIMESTAMP_TUPLE_FIELD, input, Long.class);
     
         // keep track of time
    -    flushSignal.update(timestamp);
    +    activeFlushSignal.update(timestamp);
         
         // distribute the message
         MessageRoute route = new MessageRoute(definition, entity);
    -    messageDistributor.distribute(message, timestamp, route, 
getStellarContext());
    +    synchronized (messageDistributor) {
    +      messageDistributor.distribute(message, timestamp, route, 
getStellarContext());
    +    }
    --- End diff --
    
    Access to the `messageDistributor` has to be synchronized now.  It is not 
thread safe and it could be called from either the timer thread or when tuples 
are received.


---

Reply via email to