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

ShutdownWorker frontend implementation #6511

Merged
merged 4 commits into from
Sep 27, 2024
Merged

ShutdownWorker frontend implementation #6511

merged 4 commits into from
Sep 27, 2024

Conversation

lina-temporal
Copy link
Contributor

What changed?

  • ShutdownWorker is implemented in FrontendService by forwarding to ForceUnloadTaskQueue in Matching.

Why?

  • Will be used by workers to indicate their sticky queue is no longer being polled

How did you test it?

  • new test

Potential risks

  • new API that exposes ForceUnloadTaskQueue. If callers were to abuse the operation, they could force history being reloaded as the sticky queue is cleared.

Documentation

  • New docs on the API

Is hotfix candidate?

  • No

@lina-temporal lina-temporal requested a review from a team as a code owner September 12, 2024 21:18
Copy link
Contributor

@carlydf carlydf left a comment

Choose a reason for hiding this comment

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

LGTM, holding off on approval until I understand what the plan is for the TODO.

return nil, err
}

// TODO: update poller info to indicate poller was shut down (pass identity/reason along)
Copy link
Contributor

Choose a reason for hiding this comment

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

did you still want to do this TODO?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, for now we're just using ForceUnloadTaskQueue as-is, so it doesn't note these.

service/frontend/workflow_handler_test.go Show resolved Hide resolved
Copy link
Member

@Shivs11 Shivs11 left a comment

Choose a reason for hiding this comment

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

thank you for adding the test!

@lina-temporal lina-temporal merged commit 453d3b2 into main Sep 27, 2024
46 checks passed
@lina-temporal lina-temporal deleted the shutdown-worker branch September 27, 2024 21:33
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.

4 participants