drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arina-ielchiieva <...@git.apache.org>
Subject [GitHub] drill pull request #1051: DRILL-5963: Query state process improvements
Date Mon, 04 Dec 2017 16:06:30 GMT
Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1051#discussion_r154114792
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
---
    @@ -221,11 +200,15 @@ public QueryManager getQueryManager() {
       }
     
       /**
    -   * Cancel the query. Asynchronous -- it may take some time for all remote fragments
to be
    -   * terminated.
    +   * Cancel the query. Asynchronous -- it may take some time for all remote fragments
to be terminated.
    +   * For planning and enqueued states we cancel immediately since these states are done
locally.
    +   *
    +   * Note this can be called from outside of run() on another thread, or after run()
completes
        */
       public void cancel() {
    -    // Note this can be called from outside of run() on another thread, or after run()
completes
    +    if (QueryState.PLANNING == state || QueryState.ENQUEUED == state) {
    +      moveToState(QueryState.CANCELLATION_REQUESTED, null);
    --- End diff --
    
    Fixed.


---

Mime
View raw message