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

    https://github.com/apache/drill/pull/1105#discussion_r173367462
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentExecutor.java
 ---
    @@ -488,47 +527,66 @@ void receiverFinished(FragmentHandle handle) {
           sendEvent(new FragmentEvent(EventType.RECEIVER_FINISHED, handle));
         }
     
    +    /**
    +     * Tell the {@link FragmentEventProcessor} not to process anymore 
events. This keeps stray cancellation requests
    +     * from being processed after the root has finished running and 
interrupts in the root thread have been cleared.
    +     */
    +    public synchronized void terminate() {
    +      terminate.set(true);
    +    }
    +
         @Override
         protected void processEvent(FragmentEvent event) {
    +      if (terminate.get()) {
    --- End diff --
    
    Thanks for catching. Fixed.


---

Reply via email to