-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix invalid state transition on attempt to cancel (#817)
* Fix invalid state transition on attempt to cancel Client channel implementation of close call registered cancel handlers by iterating over all blocked receivers. In the case of Cancel this results in blocked receiver collection to be modified during iteration which causes some handlers to be called multiple times. This fix clones the blocked receivers and uses the cloned copy for iteration. This guarantees that all callbacks are called once irrespective of any modifications to the list of blocked receivers during the iteration. Also added new API to allow partial replay of history from json file upto any specificed event ID. * move ActivityCancelRepro test workflow to the end
- Loading branch information
1 parent
1e3023d
commit eb10667
Showing
6 changed files
with
117 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"eventId":1,"timestamp":1563844217060613000,"eventType":"WorkflowExecutionStarted","version":-24,"workflowExecutionStartedEventAttributes":{"workflowType":{"name":"go.uber.org/cadence/test.(*Workflows).ActivityCancelRepro-fm"},"taskList":{"name":"tl-1"},"executionStartToCloseTimeoutSeconds":10,"taskStartToCloseTimeoutSeconds":1,"identity":"97228@samar-C02XG22GJGH6@"}},{"eventId":2,"timestamp":1563844217060620000,"eventType":"DecisionTaskScheduled","version":-24,"decisionTaskScheduledEventAttributes":{"taskList":{"name":"tl-1"},"startToCloseTimeoutSeconds":1,"attempt":0}},{"eventId":3,"timestamp":1563844217066914000,"eventType":"DecisionTaskStarted","version":-24,"decisionTaskStartedEventAttributes":{"scheduledEventId":2,"identity":"97228@samar-C02XG22GJGH6@tl-1","requestId":"9c612c81-6cd9-402d-866f-e5652e9c4823"}},{"eventId":4,"timestamp":1563844217073526000,"eventType":"DecisionTaskCompleted","version":-24,"decisionTaskCompletedEventAttributes":{"scheduledEventId":2,"startedEventId":3,"identity":"97228@samar-C02XG22GJGH6@tl-1"}},{"eventId":5,"timestamp":1563844217073598000,"eventType":"TimerStarted","version":-24,"timerStartedEventAttributes":{"timerId":"0","startToFireTimeoutSeconds":10,"decisionTaskCompletedEventId":4}},{"eventId":6,"timestamp":1563844217073620000,"eventType":"ActivityTaskScheduled","version":-24,"activityTaskScheduledEventAttributes":{"activityId":"1","activityType":{"name":"toUpperWithDelay"},"taskList":{"name":"tl-1"},"input":"ImhlbGxvIgo1MDAwMDAwMDAwCg==","scheduleToCloseTimeoutSeconds":10,"scheduleToStartTimeoutSeconds":10,"startToCloseTimeoutSeconds":9,"heartbeatTimeoutSeconds":0,"decisionTaskCompletedEventId":4}},{"eventId":7,"timestamp":1563844217073670000,"eventType":"ActivityTaskScheduled","version":-24,"activityTaskScheduledEventAttributes":{"activityId":"2","activityType":{"name":"toUpper"},"taskList":{"name":"bad_tl"},"input":"ImhlbGxvIgo=","scheduleToCloseTimeoutSeconds":10,"scheduleToStartTimeoutSeconds":10,"startToCloseTimeoutSeconds":9,"heartbeatTimeoutSeconds":0,"decisionTaskCompletedEventId":4}},{"eventId":8,"timestamp":1563844217073679000,"eventType":"ActivityTaskScheduled","version":-24,"activityTaskScheduledEventAttributes":{"activityId":"3","activityType":{"name":"toUpper"},"taskList":{"name":"bad_tl"},"input":"ImhlbGxvIgo=","scheduleToCloseTimeoutSeconds":10,"scheduleToStartTimeoutSeconds":10,"startToCloseTimeoutSeconds":9,"heartbeatTimeoutSeconds":0,"decisionTaskCompletedEventId":4}},{"eventId":9,"timestamp":1563844217080804000,"eventType":"ActivityTaskStarted","version":-24,"activityTaskStartedEventAttributes":{"scheduledEventId":6,"identity":"97228@samar-C02XG22GJGH6@tl-1","requestId":"8b1ab5fd-5f15-4867-af33-97a7b00da341","attempt":0}},{"eventId":10,"timestamp":1563844222089088000,"eventType":"ActivityTaskCompleted","version":-24,"activityTaskCompletedEventAttributes":{"result":"IkhFTExPIgo=","scheduledEventId":6,"startedEventId":9,"identity":"97228@samar-C02XG22GJGH6@tl-1"}},{"eventId":11,"timestamp":1563844222089104000,"eventType":"DecisionTaskScheduled","version":-24,"decisionTaskScheduledEventAttributes":{"taskList":{"name":"tl-1"},"startToCloseTimeoutSeconds":1,"attempt":0}},{"eventId":12,"timestamp":1563844222096052000,"eventType":"DecisionTaskStarted","version":-24,"decisionTaskStartedEventAttributes":{"scheduledEventId":11,"identity":"97228@samar-C02XG22GJGH6@tl-1","requestId":"89f09b7a-2f34-497f-b3c4-99ede5efaf30"}},{"eventId":13,"timestamp":1563844222102892000,"eventType":"DecisionTaskFailed","version":-24,"decisionTaskFailedEventAttributes":{"scheduledEventId":11,"startedEventId":12,"cause":"WORKFLOW_WORKER_UNHANDLED_FAILURE","details":"aW52YWxpZCBzdGF0ZSB0cmFuc2l0aW9uOiBhdHRlbXB0IHRvIGNhbmNlbCwgRGVjaXNpb25UeXBlOiBBY3Rpdml0eSwgSUQ6IDMsIHN0YXRlPUNhbmNlbGVkQWZ0ZXJJbml0aWF0ZWQsIGlzRG9uZSgpPWZhbHNlLCBoaXN0b3J5PVtDcmVhdGVkIGhhbmRsZURlY2lzaW9uU2VudCBEZWNpc2lvblNlbnQgaGFuZGxlSW5pdGlhdGVkRXZlbnQgSW5pdGlhdGVkIGNhbmNlbCBDYW5jZWxlZEFmdGVySW5pdGlhdGVkXQ==","identity":"97228@samar-C02XG22GJGH6@tl-1"}},{"eventId":14,"timestamp":1563844227061245000,"eventType":"WorkflowExecutionTimedOut","version":-24,"workflowExecutionTimedOutEventAttributes":{"timeoutType":"START_TO_CLOSE"}}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters