Repository navigation
Fix orchestration completion/termination race condition - #143
Merged
Merged
Conversation
Simon Porter (simonporter)
approved these changes
Mar 3, 2018
|
Are you guys planning a release soon? I noticed the last one is a year+ old. |
Member
Author
|
There was a release 3 days ago which includes this fix: https://www.nuget.org/packages/DurableTask.Core/2.0.0.4-preview5 |
|
So there is. Apologies, I don't always math good. :) |
Simon Porter (simonporter)
pushed a commit
that referenced
this pull request
May 18, 2018
* Fix for the issue where issuing TerminateInstanceAsync twice from client before the orchestration is picked up by dispatcher leads to a blocked orchestration (the processing keeps abandoning the orchestration). (#113) Only the first terminate request is honored and subsequent terminates are ignored. (That makes the fix simple and hopefully not a problematic behavior from user's perspective) * Handle the case where an orchestration completes and terminates at the same time (#143)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This fix addresses an issue brought up by Durable Functions customers: Azure/azure-functions-durable-extension#146.
The issue happens when DTFx receives a terminate message in the same message batch that would normally complete the orchestration. The terminate action gets executed, but then the completion action also gets executed, resulting in a state corruption error:
This is very similar to #25 (which I think is actually fixed, based on my reading of the code) but is just a slightly different variation that involves orchestration completion.