Github user vrozov commented on a diff in the pull request: https://github.com/apache/drill/pull/1105#discussion_r173526625 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentExecutor.java --- @@ -245,19 +306,17 @@ public Void run() throws Exception { // we have a heap out of memory error. The JVM in unstable, exit. CatastrophicFailure.exit(e, "Unable to handle out of memory condition in FragmentExecutor.", -2); } + } catch (InterruptedException e) { + // Swallow interrupted exceptions since we intentionally interrupt the root when cancelling a query + logger.trace("Interruped root: {}", e); } catch (Throwable t) { fail(t); } finally { - // no longer allow this thread to be interrupted. We synchronize here to make sure that cancel can't set an - // interruption after we have moved beyond this block. - synchronized (myThreadRef) { - myThreadRef.set(null); - Thread.interrupted(); - } - - // Make sure the event processor is started at least once - eventProcessor.start(); + // Don't process any more termination requests, we are done. + eventProcessor.terminate(); --- End diff -- Is this terminate() required?
---