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

Wait for activity completions on worker shutdown #370

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

cretz
Copy link
Member

@cretz cretz commented Aug 18, 2023

What was changed

On shutdown, wait on all activities to complete including their completion futures to core. In core, shutdown may complete but calls to server may still be outstanding. So in the case of #368 where the process was killed when shutdown completed, the completion may have happened but not flushed causing server to not get the completion.

There is no good/easy way to test the internal core difference between activity completion sent and activity completion flushed.

Checklist

  1. Closes [Bug] Activity completions may be dropped on worker shutdown #368

@cretz cretz requested a review from a team as a code owner August 18, 2023 20:56
@cretz cretz force-pushed the wait-activity-completions branch from a9e4534 to 60257db Compare August 18, 2023 20:58
Copy link
Member

@Sushisource Sushisource left a comment

Choose a reason for hiding this comment

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

Can you file an issue for me to fix this in Core. I get doing this here so you can move on, but I also don't love adding code here that really shouldn't exist - ideally we just fix it in Core when we encounter something like this.

@cretz
Copy link
Member Author

cretz commented Aug 21, 2023

Sure, opened temporalio/sdk-core#594

@cretz cretz merged commit 40daaaa into temporalio:main Aug 24, 2023
@cretz cretz deleted the wait-activity-completions branch August 24, 2023 15:41
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.

[Bug] Activity completions may be dropped on worker shutdown
2 participants