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

Per-namespace workers should only run on active cluster #3426

Merged
merged 3 commits into from Sep 29, 2022

Conversation

dnr
Copy link
Member

@dnr dnr commented Sep 23, 2022

What changed?
Check whether a namespace is active on this cluster before starting per-namespace worker.

Why?
No need to run workers for passive namespaces, save resources.

How did you test it?
unit test and manual test

Potential risks

Is hotfix candidate?
yes

@dnr dnr requested a review from a team as a code owner September 23, 2022 21:22
@yux0
Copy link
Contributor

yux0 commented Sep 26, 2022

Do you know if the ns callback will be trigger in failover? If no, how can the passive start the per ns workflow after failover?

@dnr
Copy link
Member Author

dnr commented Sep 29, 2022

Do you know if the ns callback will be trigger in failover? If no, how can the passive start the per ns workflow after failover?

It's a different ns callback.. I added another one that fires on state changes and ignores versions, for this purpose.

I tested locally with two clusters and saw the worker get stopped and started.

@dnr dnr merged commit e0bbabe into temporalio:master Sep 29, 2022
@dnr dnr deleted the pernsworker3 branch September 29, 2022 02:18
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.

None yet

3 participants