You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eagle.apache.org by ji...@apache.org on 2016/12/13 07:50:12 UTC

incubator-eagle git commit: [EAGLE-827] coordinator schedule timeout due to last fail

Repository: incubator-eagle
Updated Branches:
  refs/heads/master b27998f82 -> 743de7330


[EAGLE-827] coordinator schedule timeout due to last fail

Exclusive executor exception could cause take leadership execution exit with exception, it will cause follow-up take leadership fails.

Author: Xiancheng Li <xi...@ebay.com>

Closes #730 from garrettlish/master.


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/743de733
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/743de733
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/743de733

Branch: refs/heads/master
Commit: 743de733050e87653f64aca449d5d0a0eb15532d
Parents: b27998f
Author: Xiancheng Li <xi...@ebay.com>
Authored: Tue Dec 13 15:50:07 2016 +0800
Committer: wujinhu <wu...@126.com>
Committed: Tue Dec 13 15:50:07 2016 +0800

----------------------------------------------------------------------
 .../apache/eagle/alert/coordinator/ExclusiveExecutor.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/743de733/eagle-core/eagle-alert-parent/eagle-alert/alert-coordinator/src/main/java/org/apache/eagle/alert/coordinator/ExclusiveExecutor.java
----------------------------------------------------------------------
diff --git a/eagle-core/eagle-alert-parent/eagle-alert/alert-coordinator/src/main/java/org/apache/eagle/alert/coordinator/ExclusiveExecutor.java b/eagle-core/eagle-alert-parent/eagle-alert/alert-coordinator/src/main/java/org/apache/eagle/alert/coordinator/ExclusiveExecutor.java
index 86a51d9..567e1e2 100644
--- a/eagle-core/eagle-alert-parent/eagle-alert/alert-coordinator/src/main/java/org/apache/eagle/alert/coordinator/ExclusiveExecutor.java
+++ b/eagle-core/eagle-alert-parent/eagle-alert/alert-coordinator/src/main/java/org/apache/eagle/alert/coordinator/ExclusiveExecutor.java
@@ -74,9 +74,13 @@ public class ExclusiveExecutor implements Closeable {
                 // do whatever leader work you need to and only exit
                 // this method when you want to relinquish leadership
                 LOG.info("this is leader node right now..");
-                r.run();
-                LOG.info("leader node executed done!..");
                 executed.set(true);
+                try {
+                    r.run();
+                } catch (Throwable t) {
+                    LOG.warn("failed to run exclusive executor", t);
+                }
+                LOG.info("leader node executed done!..");
             }
 
             @Override