drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dvjyothsna <...@git.apache.org>
Subject [GitHub] drill pull request #921: DRILL-4286 Graceful shutdown of drillbit
Date Wed, 15 Nov 2017 17:45:31 GMT
Github user dvjyothsna commented on a diff in the pull request:

    https://github.com/apache/drill/pull/921#discussion_r151201233
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/work/WorkManager.java ---
    @@ -165,32 +169,59 @@ public DrillbitContext getContext() {
        *
        * <p>This is intended to be used by {@link org.apache.drill.exec.server.Drillbit#close()}.</p>
        */
    -  public void waitToExit() {
    +  public void waitToExit(Drillbit bit, boolean forcefulShutdown) {
         synchronized(this) {
    -      if (queries.isEmpty() && runningFragments.isEmpty()) {
    +      numOfRunningQueries = queries.size();
    +      numOfRunningFragments = runningFragments.size();
    +      if ( queries.isEmpty() && runningFragments.isEmpty()) {
    --- End diff --
    
    We compare if the remaining queries are going down or if new queries are added during
shutdown.


---

Mime
View raw message