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

    https://github.com/apache/storm/pull/2502#discussion_r167387808
  
    --- Diff: 
storm-client/src/jvm/org/apache/storm/executor/spout/SpoutOutputCollectorImpl.java
 ---
    @@ -44,14 +48,15 @@
         private final Boolean isEventLoggers;
         private final Boolean isDebug;
         private final RotatingMap<Long, TupleInfo> pending;
    +    private TupleInfo globalTupleInfo = new TupleInfo();  // thread 
safety: assumes Collector.emit*() calls are externally synchronized (if needed).
    --- End diff --
    
    Can we do a sanity check for the fast path + documentation?  Check if the 
thread id is the same as the id of the main thread we expect emits to come 
from.  If so we go with the fast path, if not we have a thread local or do some 
kind of locking + documentation about why you never want the spout to emit from 
a background thread.


---

Reply via email to