Skip to content
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

bugfix: parent workflow, when signaling child workflow, can experienc… #607

Merged
merged 2 commits into from
Mar 12, 2018

Conversation

wxing1292
Copy link
Contributor

…e deadlock, if child workflow, at the same time, is completed.

…e deadlock, if child workflow, at the same time, is completed.
@wxing1292 wxing1292 requested a review from samarabbas March 12, 2018 20:50
@@ -328,26 +328,26 @@ func (t *transferQueueProcessorImpl) processActivityTask(task *persistence.Trans
if err != nil {
return err
}
defer release()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you immediate call 'defer release()' after acquiring the release object?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there can be cases when cache is full and context, release being nil, while err not being nil, doing defer release() before error checking can lead to null pointer issue


release()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment on why calling the release here is important.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

workflowTypeName := msBuilder.executionInfo.WorkflowTypeName
workflowStartTimestamp := msBuilder.executionInfo.StartTimestamp.UnixNano()
workflowCloseTimestamp := msBuilder.getLastUpdatedTimestamp()
workflowStatue := getWorkflowExecutionCloseStatus(msBuilder.executionInfo.CloseStatus)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: typo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -455,16 +456,30 @@ func (t *transferQueueProcessorImpl) processCloseExecution(task *persistence.Tra
return err
}

isChildWorkflow := msBuilder.hasParentExecution()
workflowCloseStatus := msBuilder.executionInfo.CloseStatus
completionEvent, _ := msBuilder.GetCompletionEvent()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will unnecessarily deserialize the completionEvent even for execution which does not have a Parent. Can you bring this back with the If check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@coveralls
Copy link

coveralls commented Mar 12, 2018

Coverage Status

Coverage increased (+0.005%) to 64.046% when pulling 8fc8d8a on bugfix-transfer into 0a4abbe on master.

@wxing1292 wxing1292 merged commit 35bf3de into master Mar 12, 2018
@wxing1292 wxing1292 deleted the bugfix-transfer branch March 12, 2018 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants