Closed Quinn-With-Two-Ns closed 1 month ago
Auditing the replay code
if (replaying
&& !hasNextEvent
&& (event.getEventType() == EventType.EVENT_TYPE_WORKFLOW_TASK_STARTED
|| WorkflowExecutionUtils.isWorkflowTaskClosedEvent(event))) {
replaying = false;
}
This check is flawed since if we receive a query after a workflow task that didn't generate a command will cause the Java SDK to incorrectly assume the workflow is no longer replaying.
Expected Behavior
isReplaying()
is true when replaying and false when not replayingActual Behavior
isReplaying()
is false when the workflow is replaying for a querySteps to Reproduce the Problem
1.Start a workflow that immediately waits for a signal 2.Restart the worker running the above workflow 3.Send a query to the workflow
Specifications