alirezazamani commented on a change in pull request #1231:
URL: https://github.com/apache/helix/pull/1231#discussion_r467313630
##########
File path: helix-core/src/main/java/org/apache/helix/task/JobDispatcher.java
##########
@@ -87,9 +87,10 @@ public ResourceAssignment
processJobStatusUpdateAndAssignment(String jobName,
TaskState jobState = workflowCtx.getJobState(jobName);
// The job is already in a final state (completed/failed).
if (workflowState == TaskState.FAILED || workflowState ==
TaskState.COMPLETED
- || jobState == TaskState.FAILED || jobState == TaskState.COMPLETED) {
+ || jobState == TaskState.FAILED || jobState == TaskState.COMPLETED
+ || jobState == TaskState.TIMED_OUT) {
LOG.info(String.format(
- "Workflow %s or job %s is already failed or completed, workflow
state (%s), job state (%s), clean up job IS.",
+ "Workflow %s or job %s is already in final state, workflow state
(%s), job state (%s), clean up job IS.",
Review comment:
maybe it is better to change this comment to failed, complete and
time_out. Because there are other terminal states as well.
##########
File path: helix-core/src/main/java/org/apache/helix/task/TaskUtil.java
##########
@@ -733,10 +734,29 @@ protected static boolean removeJobsFromWorkflow(final
HelixDataAccessor dataAcce
if (workflowContext != null) {
Map<String, TaskState> jobStates = workflowContext.getJobStates();
for (String job : workflowConfig.getJobDag().getAllNodes()) {
+ if (expiredJobs.contains(job)) {
+ continue;
+ }
JobConfig jobConfig = TaskUtil.getJobConfig(dataAccessor, job);
JobContext jobContext = TaskUtil.getJobContext(propertyStore, job);
- if (isJobExpired(job, jobConfig, jobContext, jobStates.get(job))) {
+ TaskState jobState = jobStates.get(job);
Review comment:
Can you confirm if jobState here is not null always?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]