kaisun2000 opened a new issue #1234:
URL: https://github.com/apache/helix/issues/1234
Log:
>[ERROR]
testWorkflowPausedTimeout(org.apache.helix.integration.task.TestWorkflowTimeout)
Time elapsed: 8,280.587 s <<< FAILURE!
org.apache.helix.HelixException: Workflow "testWorkflowPausedTimeout"
context is empty or not in states: "[TIMED_OUT]", current state: "STOPPED"
at
org.apache.helix.integration.task.TestWorkflowTimeout.testWorkflowPausedTimeout(TestWorkflowTimeout.java:81)
Note for 8,280 seconds, or more than two hours it does not return.
code:
` _driver.pollForWorkflowState(workflowName, 10000L,
TaskState.TIMED_OUT);`
From code, it seems that blocking call in `pollForWorkflowState` is `ctx =
getWorkflowContext(workflowName);`
```
public TaskState pollForWorkflowState(String workflowName, long timeout,
TaskState... targetStates) throws InterruptedException {
// Wait for completion.
long st = System.currentTimeMillis();
WorkflowContext ctx;
Set<TaskState> allowedStates = new
HashSet<>(Arrays.asList(targetStates));
long timeToSleep = timeout > 100L ? 100L : timeout;
do {
Thread.sleep(timeToSleep);
ctx = getWorkflowContext(workflowName);
} while ((ctx == null || ctx.getWorkflowState() == null
|| !allowedStates.contains(ctx.getWorkflowState()))
&& System.currentTimeMillis() < st + timeout);
if (ctx == null || !allowedStates.contains(ctx.getWorkflowState())) {
throw new HelixException(String.format(
"Workflow \"%s\" context is empty or not in states: \"%s\",
current state: \"%s\"",
workflowName, Arrays.asList(targetStates),
ctx == null ? "null" : ctx.getWorkflowState().toString()));
}
return ctx.getWorkflowState();
}
```
----------------------------------------------------------------
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]