Github user markhamstra commented on the issue:

    https://github.com/apache/spark/pull/16291
  
    > You are right, that's why the executor service is single threaded which 
guarantees ordered processing of the events per listener.
    
    But this is still substantially different from the ordering guarantees in 
the current implementation, and I'm not sure that this PR wouldn't invalidate 
some assumptions made by current listeners.   Events will end up in the same 
order in each `ListenerEventExecutor` (at least by my understanding, which 
someone else should double-check), but there is no synchronization between 
`ListenerEventExecutor`s of the processing of their `eventQueue`s; so it is 
entirely possible. for example, for one `ListenerEventExecutor` to process a 
task end event for a particular task before another `ListenerEventExecutor` has 
worked sufficiently through its `eventQueue` to have even seen the 
corresponding task start event.  That is quite a bit different than the prior 
ordering guarantee implied by the comment "`onPostEvent` is guaranteed to be 
called in the same thread for all listeners."
    
    Whether this actually constitutes a problem or not, I'm not certain; but 
serializing event processing within each `ListenerEventExecutor` isn't enough 
if `Listener`s on different `ListenerEventExecutor` threads expect to share 
mutable state. 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to