[WIP] Clear workflowExecutionIsCancelling on new WFT #1175
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Clear
workflowExecutionIsCancelling
on new WFT.As far as I can tell
workflowExecutionIsCancelling
is only needed because on workflow cancelation we generate the cancel commands eagerly before the WFT started and when we process the WFT started event we reset the eventID the Go SDK uses for counting so this throws off everything in the SDK. The problem with the current implementation is it assumes all cancels after a workflow cancel request are a result of the cancel request and that is not true.I believe after the cancel request callback is processed this whole
workflowExecutionIsCancelling
logic should not be needed since all the out of workflow execution callbacks should be done, but I could be wrong on this point.I think the best solution would be to remove this
workflowExecutionIsCancelling
and generate the cancel commands after setting the eventID on WFT started, but there is a 2+ year history of cancellation issues around this so It is very possible I am missing something.Summary of the history of this flag:
#726
Fix for #1176