New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timeout exception on IWorkflowService#ResetWorkflowExecution #562
Comments
Docker-compose
|
cadence --domain DOMAIN --address host.docker.internal:7933 workflow reset -w f5e392e2-20ed-4239-9633-65
a352fbd202 -r 5115e281-f48b-4f51-a3de-f1b9880677a3 --event_id 4 --reason "<Some string>" Works fine |
If I set event id = 5 then it returns this error:
|
@sokada1221 |
@polyansky-syberry sorry for late response. Are you able to address the issue finally? Basically reset is only allowed at DecisionTask boundary(DecisionTaskCompleted/failed/timeout events, in newer server versions, we also support scheduled/started) |
@longquanzheng Hi! You mentioned that now it's possible to reset workflow execution from DecisionTaskScheduled event. I tried to reset execution from event 2 (used java-client version 3.6.1 and server v0.23.2 and v0.22.4).
But it throws exception while resetting execution:
If to try to reset from event 3 programmatically it throws exception:
If to reset this execution via cli from event 3, it will be reset successfully.
But how can be reset such execution programmatically? Can the whole workflow be reset from the beginning? |
Yeah I think the new feature is just to allow resetting to the event next
to decision scheduled.
You can look up the history to find first decision scheduled and add 1 to
the event Id .
On Fri, Feb 11, 2022 at 6:55 AM Anastasia Vitkovskaya < ***@***.***> wrote:
@longquanzheng <https://github.com/longquanzheng> Hi! You mentioned that
now it's possible to reset workflow execution from DecisionTaskScheduled
event.
I have timeouted execution with such eventHistory:
[image: image]
<https://user-images.githubusercontent.com/77055765/153611967-840240f2-6e4c-4813-8b43-039fb74ba37c.png>
I tried to reset execution from event 2 (used java-client version 3.6.1
and server v0.23.2 and v0.22.4).
public String resetWorkflow() {
var request = new ResetWorkflowExecutionRequest();
var workflowExecution = new WorkflowExecution()
.setRunId(runId)
.setWorkflowId(workflowId);
request.setWorkflowExecution(workflowExecution);
request.setDecisionFinishEventId(2);
request.setDomain(domain);
try {
return cadenceService.ResetWorkflowExecution(request).getRunId();
} catch (TException ex) {
throw new CadenceServiceException("Couldn't reset workflow execution", ex);
}
}
But it throws exception while resetting execution:
Caused by: com.uber.cadence.BadRequestError: nDCStateRebuilder unable to rebuild mutable state to event ID: 1, version: -24, baseLastEventID + baseLastEventVersion is not the same as the last event of the last batch, event ID: 2, version :-24 ,typically because of attemptting to rebuild to a middle of a batch
at com.uber.cadence.WorkflowService$ResetWorkflowExecution_result$ResetWorkflowExecution_resultStandardScheme.read(WorkflowService.java:38530) ~[cadence-client-3.6.1.jar:na]
at com.uber.cadence.WorkflowService$ResetWorkflowExecution_result$ResetWorkflowExecution_resultStandardScheme.read(WorkflowService.java:38507) ~[cadence-client-3.6.1.jar:na]
at com.uber.cadence.WorkflowService$ResetWorkflowExecution_result.read(WorkflowService.java:38406) ~[cadence-client-3.6.1.jar:na]
at org.apache.thrift.TDeserializer.deserialize(TDeserializer.java:81) ~[libthrift-0.9.3.jar:0.9.3]
at org.apache.thrift.TDeserializer.deserialize(TDeserializer.java:67) ~[libthrift-0.9.3.jar:0.9.3]
at com.uber.tchannel.messages.ThriftSerializer.decodeBody(ThriftSerializer.java:101) ~[tchannel-core-0.8.30.jar:na]
at com.uber.tchannel.messages.Serializer.decodeBody(Serializer.java:49) ~[tchannel-core-0.8.30.jar:na]
at com.uber.tchannel.messages.EncodedResponse.getBody(EncodedResponse.java:85) ~[tchannel-core-0.8.30.jar:na]
at com.uber.cadence.serviceclient.WorkflowServiceTChannel.resetWorkflowExecution(WorkflowServiceTChannel.java:1490) ~[cadence-client-3.6.1.jar:na]
at com.uber.cadence.serviceclient.WorkflowServiceTChannel.lambda$ResetWorkflowExecution$27(WorkflowServiceTChannel.java:1477) ~[cadence-client-3.6.1.jar:na]
at com.uber.cadence.serviceclient.WorkflowServiceTChannel.measureRemoteCallWithTags(WorkflowServiceTChannel.java:374) ~[cadence-client-3.6.1.jar:na]
at com.uber.cadence.serviceclient.WorkflowServiceTChannel.measureRemoteCall(WorkflowServiceTChannel.java:362) ~[cadence-client-3.6.1.jar:na]
If to try to reset from event 3 programmatically it throws exception:
Caused by: org.apache.thrift.TException: Rpc error:<ErrorResponse id=6 errorType=UnexpectedError message=cadence internal error, msg: CreateWorkflowExecution operation failed. Error: invalid UUID "">
at com.uber.cadence.serviceclient.WorkflowServiceTChannel.throwOnRpcError(WorkflowServiceTChannel.java:345) ~[cadence-client-3.6.1.jar:na]
at com.uber.cadence.serviceclient.WorkflowServiceTChannel.doRemoteCall(WorkflowServiceTChannel.java:316) ~[cadence-client-3.6.1.jar:na]
at com.uber.cadence.serviceclient.WorkflowServiceTChannel.resetWorkflowExecution(WorkflowServiceTChannel.java:1488) ~[cadence-client-3.6.1.jar:na]
at com.uber.cadence.serviceclient.WorkflowServiceTChannel.lambda$ResetWorkflowExecution$27(WorkflowServiceTChannel.java:1477) ~[cadence-client-3.6.1.jar:na]
at com.uber.cadence.serviceclient.WorkflowServiceTChannel.measureRemoteCallWithTags(WorkflowServiceTChannel.java:374) ~[cadence-client-3.6.1.jar:na]
at com.uber.cadence.serviceclient.WorkflowServiceTChannel.measureRemoteCall(WorkflowServiceTChannel.java:362) ~[cadence-client-3.6.1.jar:na]
at com.uber.cadence.serviceclient.WorkflowServiceTChannel.ResetWorkflowExecution(WorkflowServiceTChannel.java:1476) ~[cadence-client-3.6.1.jar:na]
If to reset this execution via cli from event 3, it will be reset
successfully.
cadence --domain WORKFLOWS_PRIMARY --address host.docker.internal:7933 workflow reset -w timeout_test_with_childWF.2
022-01-19T11:05:06Z -r 15b64382-28ef-4c03-8bfe-5be59ac4b390 --event_id 3 --reason "<Reset>"
{
"runId": "2d6caf81-e780-4eed-a117-d167dd5d0c92"
}
But how can be reset such execution programmatically? Can the whole
workflow be reset from the beginning?
—
Reply to this email directly, view it on GitHub
<#562 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCQPM3J7FHI7ZR2VN7HQPLU2UPPVANCNFSM4TK546QA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Thanks,
Quanzheng
|
Hi, @longquanzheng |
What if you reset to event 2?
On Wed, Mar 2, 2022 at 5:05 AM Anastasia Vitkovskaya < ***@***.***> wrote:
Hi, @longquanzheng <https://github.com/longquanzheng>
If I have such events history in workflow run
[image: image]
<https://user-images.githubusercontent.com/77055765/156365393-8d05f0af-b05c-4220-9c91-34991fb6b80e.png>
I reset execution from event 3
and java client returns error
Caused by: org.apache.thrift.TException: Rpc error:<ErrorResponse id=7
errorType=UnexpectedError message=cadence internal error, msg:
CreateWorkflowExecution operation failed. Error: invalid UUID "">
Is this a server side error? But via cli such workflow is resetted
how can such workflow can be resetted using java client?
—
Reply to this email directly, view it on GitHub
<#562 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCQPM7A6UNN4C6I25M3M2DU55RTBANCNFSM4TK546QA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Thanks,
Quanzheng
|
Hey, @longquanzheng |
@longquanzheng, hi! Can you pls provide info how to reset such executions? |
Code (modified samples):
What I get:
Through CLI everything works.
Ahead of questions it is crucial for me to be capable of rerunning workflows programmatically to be able to do so under Spring.
It seems like cadence server stops the processing because timeout is not configured (in CLI we have --context_timeout option for that), but I mot sure it's true.
Can you help me with that?
The text was updated successfully, but these errors were encountered: