drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkhatua <...@git.apache.org>
Subject [GitHub] drill pull request #1055: DRILL-5973 : Support injection of time-bound pause...
Date Fri, 01 Dec 2017 01:17:55 GMT
Github user kkhatua commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1055#discussion_r154247418
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/testing/ExecutionControlsInjector.java
---
    @@ -81,8 +83,20 @@ public void injectPause(final ExecutionControls executionControls,
final String
           executionControls.lookupPauseInjection(this, desc);
     
         if (pauseInjection != null) {
    -      logger.debug("Pausing at {}", desc);
    -      pauseInjection.pause();
    +      long pauseDuration = pauseInjection.getMsPause();
    +      if ( pauseDuration > 0L) {
    +        logger.debug("Pausing at {} for {} sec", desc, TimeUnit.MILLISECONDS.toSeconds(pauseDuration)
);
    +      } else {
    +        logger.debug("Pausing at {}", desc);
    +      }
    +      try {
    +        pauseInjection.pause();
    +      } catch (InterruptedException e) {
    +        //Unpause if this is a timed pause, because an explicit unpause is not called
    +        if (pauseDuration > 0L) {
    --- End diff --
    
    Will make the change since the InterruptedException is being handled in the timed pause
(based on your comment below).


---

Mime
View raw message