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

Fix problem terminating orchestration with running activity #83

Merged
merged 1 commit into from
Apr 28, 2022

Conversation

cgillum
Copy link
Member

@cgillum cgillum commented Apr 28, 2022

Resolves #81

We were incorrectly raising an error from SQL if an activity task completes for an instance that's no longer running (e.g., a terminated instance). Because of this, we'd never delete the task-scheduled message, and it would re-execute continuously. This PR updates the _CompleteTasks sproc to handle this case correctly by ensuring we always delete the task-scheduled message.

While testing the fix, I also found an issue where we don't delete the task-scheduled message payloads after an activity completes (successfully or not), resulting in unreferenced payload data in the database (until the instance is purged). This is also fixed in this PR.

Also fix data leak for completed activities
@cgillum cgillum merged commit f6bd801 into main Apr 28, 2022
@cgillum cgillum deleted the cgillum/fix81 branch April 28, 2022 05:34
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.

Problem terminating orchestration with running activity
1 participant