You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by hu...@apache.org on 2019/05/25 01:19:48 UTC
[helix] 14/44: TASK: Fix bug in getExpiredJobs()
This is an automated email from the ASF dual-hosted git repository.
hulee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git
commit 2f4f3dedbc7e5fc108da369b07de18174c376e58
Author: Hunter Lee <hu...@linkedin.com>
AuthorDate: Mon Apr 8 21:08:37 2019 -0700
TASK: Fix bug in getExpiredJobs()
getExpiredJobs() had a bug where if the job has the same expiry time as workflow's default expiry, it would always override it with Workflow's expiry config. This is not correct.
Changelist:
1. Remove a block of code where it overrides expiry config with WorkflowConfig's default expiry
RB=1624376
G=helix-reviewers
A=jxue
Signed-off-by: Hunter Lee <hu...@linkedin.com>
---
helix-core/src/main/java/org/apache/helix/task/TaskDriver.java | 2 +-
helix-core/src/main/java/org/apache/helix/task/TaskUtil.java | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/helix-core/src/main/java/org/apache/helix/task/TaskDriver.java b/helix-core/src/main/java/org/apache/helix/task/TaskDriver.java
index c8921d8..baa5467 100644
--- a/helix-core/src/main/java/org/apache/helix/task/TaskDriver.java
+++ b/helix-core/src/main/java/org/apache/helix/task/TaskDriver.java
@@ -1129,4 +1129,4 @@ public class TaskDriver {
"Cannot create more workflows or jobs because there are already too many items created in the path CONFIGS.");
}
}
-}
\ No newline at end of file
+}
diff --git a/helix-core/src/main/java/org/apache/helix/task/TaskUtil.java b/helix-core/src/main/java/org/apache/helix/task/TaskUtil.java
index 5da9fc5..9992c2b 100644
--- a/helix-core/src/main/java/org/apache/helix/task/TaskUtil.java
+++ b/helix-core/src/main/java/org/apache/helix/task/TaskUtil.java
@@ -742,9 +742,6 @@ public class TaskUtil {
continue;
}
long expiry = jobConfig.getExpiry();
- if (expiry == WorkflowConfig.DEFAULT_EXPIRY || expiry < 0) {
- expiry = workflowConfig.getExpiry();
- }
if (jobContext != null && jobStates.get(job) == TaskState.COMPLETED) {
if (jobContext.getFinishTime() != WorkflowContext.UNFINISHED
&& System.currentTimeMillis() >= jobContext.getFinishTime() + expiry) {