airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dimuthu...@apache.org
Subject [airavata] branch staging updated: Fixing the bug of task retry when the retry count is 1
Date Wed, 26 Sep 2018 16:39:17 GMT
This is an automated email from the ASF dual-hosted git repository.

dimuthuupe pushed a commit to branch staging
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/staging by this push:
     new 46fde14  Fixing the bug of task retry when the retry count is 1
46fde14 is described below

commit 46fde1411397e6a01a8fef7cd9ce58e7b4fdf822
Author: Dimuthu Wannipurage <dimuthu.wannipurage@datasprouts.com>
AuthorDate: Wed Sep 26 12:39:07 2018 -0400

    Fixing the bug of task retry when the retry count is 1
---
 .../main/java/org/apache/airavata/helix/impl/task/AiravataTask.java   | 4 ++--
 .../main/java/org/apache/airavata/helix/core/util/MonitoringUtil.java | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/AiravataTask.java
b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/AiravataTask.java
index d2e03d8..940e170 100644
--- a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/AiravataTask.java
+++ b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/AiravataTask.java
@@ -90,7 +90,7 @@ public abstract class AiravataTask extends AbstractTask {
     }
 
     protected TaskResult onFail(String reason, boolean fatal, Throwable error) {
-        int currentRetryCount = 0;
+        int currentRetryCount = 1;
         try {
             currentRetryCount = getCurrentRetryCount();
         } catch (Exception e) {
@@ -98,7 +98,7 @@ public abstract class AiravataTask extends AbstractTask {
             fatal = true;
         }
 
-        logger.warn("Task failed with fatal = " + fatal + ".  Current retry count " + currentRetryCount);
+        logger.warn("Task failed with fatal = " + fatal + ".  Current retry count " + currentRetryCount
+ " total retry count " + getRetryCount());
 
         if (currentRetryCount < getRetryCount() && !fatal) {
             try {
diff --git a/modules/airavata-helix/task-core/src/main/java/org/apache/airavata/helix/core/util/MonitoringUtil.java
b/modules/airavata-helix/task-core/src/main/java/org/apache/airavata/helix/core/util/MonitoringUtil.java
index 9a072b2..3f1690d 100644
--- a/modules/airavata-helix/task-core/src/main/java/org/apache/airavata/helix/core/util/MonitoringUtil.java
+++ b/modules/airavata-helix/task-core/src/main/java/org/apache/airavata/helix/core/util/MonitoringUtil.java
@@ -43,7 +43,7 @@ public class MonitoringUtil {
 
     public static void increaseTaskRetryCount(CuratorFramework curatorClient, String takId)
throws Exception {
         String path = TASK + "/" + takId + RETRY;
-        int currentRetryCount = 2;
+        int currentRetryCount = 1;
         if (curatorClient.checkExists().forPath(path) != null) {
             byte[] processBytes = curatorClient.getData().forPath(path);
             currentRetryCount = Integer.parseInt(new String(processBytes)) + 1;


Mime
View raw message