Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1113#discussion_r168415470
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryStateProcessor.java
 ---
    @@ -125,20 +125,17 @@ public void cancel() {
           case PREPARING:
           case PLANNING:
           case ENQUEUED:
    -        moveToState(QueryState.CANCELLATION_REQUESTED, null);
    -        return;
    -
           case STARTING:
           case RUNNING:
    -        addToEventQueue(QueryState.CANCELLATION_REQUESTED, null);
    -        return;
    +        moveToState(QueryState.CANCELLATION_REQUESTED, null);
    --- End diff --
    
    1. Could you please explain why `addToEventQueue` was changed to 
`moveToState`. Per my understanding `addToEventQueue` is used to ensure that 
cancellation will be requested only when all fragments are sent out to avoid 
hanging in cancellation requested state. For preparing, planning and enqueued 
states we cancel immediately since these states are done locally.
    2. Why this Jira title states it's a regression? Do we know what has caused 
the regression?


---

Reply via email to