You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/06/23 16:10:37 UTC

[GitHub] [helix] alirezazamani commented on a change in pull request #1114: Fix the queue not going to IN_PROGRESS state

alirezazamani commented on a change in pull request #1114:
URL: https://github.com/apache/helix/pull/1114#discussion_r444342267



##########
File path: helix-core/src/main/java/org/apache/helix/task/WorkflowDispatcher.java
##########
@@ -174,6 +174,16 @@ public void updateWorkflowStatus(String workflow, WorkflowConfig workflowCfg,
       }
       return;
     }
+
+    // Step 6: handle workflow that should go IN_PROGRESS state after is has been resumed
+    // This block is added to make sure if workflow/queue context state becomes IN_PROGRESS for the
+    // case where A Queue which has been stopped before is just resumed and queue does not contain
+    // any job that needs to be run.
+    if (targetState.equals(TargetState.START)
+        && workflowCtx.getWorkflowState().equals(TaskState.STOPPED)) {

Review comment:
       No it can't. If it is null, the method will return NOT_STARTED:
   ```
     public TaskState getWorkflowState() {
       String state = _record.getSimpleField(WorkflowContextProperties.STATE.name());
       if (state == null) {
         return TaskState.NOT_STARTED;
       }
   
       return TaskState.valueOf(state);
     }
   ```




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org