You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2021/07/06 03:45:33 UTC

[GitHub] [zeppelin] zjffdu opened a new pull request #4162: [ZEPPELIN-5441] Check no jobs running before kill interpreter job in TimeoutLifecycleManager

zjffdu opened a new pull request #4162:
URL: https://github.com/apache/zeppelin/pull/4162


   ### What is this PR for?
   
   Minor PR to check no jobs running before kill interpreter job in `TimeoutLifecycleManager`, otherwise it is possible to kill interpreter process that still has jobs running.
   
   ### What type of PR is it?
   [Improvement ]
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   * https://issues.apache.org/jira/browse/ZEPPELIN-5441
   
   ### How should this be tested?
   * Ci pass
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * Does the licenses files need update? No
   * Is there breaking changes for older versions? No
   * Does this needs documentation? No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zeppelin] zjffdu commented on a change in pull request #4162: [ZEPPELIN-5441] Check no jobs running before kill interpreter job in TimeoutLifecycleManager

Posted by GitBox <gi...@apache.org>.
zjffdu commented on a change in pull request #4162:
URL: https://github.com/apache/zeppelin/pull/4162#discussion_r669736329



##########
File path: zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManager.java
##########
@@ -53,7 +57,8 @@ public TimeoutLifecycleManager(ZeppelinConfiguration zConf,
     ScheduledExecutorService checkScheduler = ExecutorFactory.singleton()
         .createOrGetScheduled("TimeoutLifecycleManager", 1);
     checkScheduler.scheduleAtFixedRate(() -> {
-      if ((System.currentTimeMillis() - lastBusyTimeInMillis) > timeoutThreshold) {
+      if ((System.currentTimeMillis() - lastBusyTimeInMillis) > timeoutThreshold &&
+              noJobsRunning()) {

Review comment:
       In one corner case, `lastBusyTimeInMilli` won't be updated, that is when zeppelin server is dead then `RemoteInterpreterServer#getProgress`  and `RemoteInterpreterServer#getStatus` won't be called. Thanks for the comment, let me update this PR with more comment to explain that. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [zeppelin] cuspymd commented on a change in pull request #4162: [ZEPPELIN-5441] Check no jobs running before kill interpreter job in TimeoutLifecycleManager

Posted by GitBox <gi...@apache.org>.
cuspymd commented on a change in pull request #4162:
URL: https://github.com/apache/zeppelin/pull/4162#discussion_r669665813



##########
File path: zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManager.java
##########
@@ -53,7 +57,8 @@ public TimeoutLifecycleManager(ZeppelinConfiguration zConf,
     ScheduledExecutorService checkScheduler = ExecutorFactory.singleton()
         .createOrGetScheduled("TimeoutLifecycleManager", 1);
     checkScheduler.scheduleAtFixedRate(() -> {
-      if ((System.currentTimeMillis() - lastBusyTimeInMillis) > timeoutThreshold) {
+      if ((System.currentTimeMillis() - lastBusyTimeInMillis) > timeoutThreshold &&
+              noJobsRunning()) {

Review comment:
       According to the original design, if a job is running, shouldn't `lastBusyTimeInMilli` be updated?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org