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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to