Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/921#discussion_r150973540
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/server/Drillbit.java ---
    @@ -176,18 +200,37 @@ public void run() throws Exception {
         logger.info("Startup completed ({} ms).", 
w.elapsed(TimeUnit.MILLISECONDS));
       }
     
    +  /*
    +    Wait uninterruptibly
    +   */
    +  public void waitForGracePeriod() {
    +    ExtendedLatch exitLatch = null;
    +    exitLatch = new ExtendedLatch();
    +    exitLatch.awaitUninterruptibly(gracePeriod);
    --- End diff --
    
    I wonder about synchronization. This latch is private, so never triggered, 
except in a timeout. How is this different than `Thread.sleep()`, other than 
blocking interrupts? If so, maybe a comment to this effect.
    
    Note also that this is called from inside a synchronized block. Just want 
to verify that this is the intent.


---

Reply via email to