You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by ka...@apache.org on 2014/11/19 05:03:27 UTC

helix git commit: [HELIX-549] Rethrow ThreadDeath instead of discarding.

Repository: helix
Updated Branches:
  refs/heads/helix-0.6.x 961a9e1fe -> 2eaea9135


[HELIX-549] Rethrow ThreadDeath instead of discarding.


Project: http://git-wip-us.apache.org/repos/asf/helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/2eaea913
Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/2eaea913
Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/2eaea913

Branch: refs/heads/helix-0.6.x
Commit: 2eaea9135e345ff027a41010d0a4ab2a3d0620f3
Parents: 961a9e1
Author: Antony T Curtis <ac...@linkedin.com>
Authored: Mon Nov 17 13:08:01 2014 -0800
Committer: Antony T Curtis <ac...@linkedin.com>
Committed: Mon Nov 17 13:08:01 2014 -0800

----------------------------------------------------------------------
 .../java/org/apache/helix/controller/GenericHelixController.java   | 2 ++
 .../main/java/org/apache/helix/manager/zk/ZkCacheEventThread.java  | 2 ++
 helix-core/src/main/java/org/apache/helix/task/TaskRunner.java     | 2 ++
 3 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/helix/blob/2eaea913/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java b/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
index 81c2e3d..542316a 100644
--- a/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
+++ b/helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
@@ -587,6 +587,8 @@ public class GenericHelixController implements ConfigChangeListener, IdealStateC
         } catch (ZkInterruptedException e) {
           logger.warn("ClusterEventProcessor caught a ZK connection interrupt", e);
           interrupt();
+        } catch (ThreadDeath death) {
+          throw death;
         } catch (Throwable t) {
           logger.error("ClusterEventProcessor failed while running the controller pipeline", t);
         }

http://git-wip-us.apache.org/repos/asf/helix/blob/2eaea913/helix-core/src/main/java/org/apache/helix/manager/zk/ZkCacheEventThread.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkCacheEventThread.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkCacheEventThread.java
index e88b7a3..12c198e 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkCacheEventThread.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkCacheEventThread.java
@@ -68,6 +68,8 @@ public class ZkCacheEventThread extends Thread {
           interrupt();
         } catch (ZkInterruptedException e) {
           interrupt();
+        } catch (ThreadDeath death) {
+          throw death;
         } catch (Throwable e) {
           LOG.error("Error handling event " + zkEvent, e);
         }

http://git-wip-us.apache.org/repos/asf/helix/blob/2eaea913/helix-core/src/main/java/org/apache/helix/task/TaskRunner.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/task/TaskRunner.java b/helix-core/src/main/java/org/apache/helix/task/TaskRunner.java
index 7941acb..abd1882 100644
--- a/helix-core/src/main/java/org/apache/helix/task/TaskRunner.java
+++ b/helix-core/src/main/java/org/apache/helix/task/TaskRunner.java
@@ -64,6 +64,8 @@ public class TaskRunner implements Runnable {
       signalStarted();
       try {
         _result = _task.run();
+      } catch (ThreadDeath death) {
+        throw death;
       } catch (Throwable t) {
         LOG.error("Problem running the task", t);
         _result = new TaskResult(Status.ERROR, null);