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 worker shutdown during replay test #631

Merged

Conversation

antlai-temporal
Copy link
Contributor

This fixes issue #630 by closing the external channel early when we are using a mock client associated with the worker.

This will disable Eager Start Workflow with mock clients, but since ESW is a latency optimization, and we do not use mock clients during its testing, this has no practical consequences.

  1. Closes
    [Bug] Shutdown worker after replay test #630

@antlai-temporal antlai-temporal requested a review from a team as a code owner November 14, 2023 08:07
Comment on lines 116 to 117
/// True if this manager is associated with a mock client.
mock: bool,
Copy link
Member

Choose a reason for hiding this comment

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

Rather than adding this here, I think it would be a little cleaner to add is_mock to the WorkerClient trait and simply not instantiate / merge the external WFT channel if it is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved to WorkerClient.

The only reason to merge the closed stream is to satisfy the Rust typing gods... Select is not the same type as Stream, is there a way to cast it into a vanilla Stream?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your great suggestion of using an Either stream! Channel not merged.

@antlai-temporal antlai-temporal merged commit 8afcc50 into temporalio:master Nov 14, 2023
5 checks passed
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.

2 participants