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

Handle namespaceNotActive error in parentClosePolicy workflow #2394

Merged
merged 2 commits into from
Jan 26, 2022

Conversation

yycptt
Copy link
Member

@yycptt yycptt commented Jan 20, 2022

What changed?

  • Handle namespaceNotActive error in parentClosePolicy workflow
  • If chlid domain active in a different cluster, signal the system workflow in the remote cluster to apply the parent close policy.
  • We can't rely on frontend autoforwarding for Terminate/RequestCancel, because there're some request fields we need to use that only exist in history service interface.

Why?

  • Currently if child domain performs a failover after parent close policy receive the signal, the signal request can not be processed.

How did you test it?

  • Added unit test

Potential risks

  • if remote cluster is down then, the workflow will keep retrying sending the signal, but this is the same as today because we will keep retrying on namespace not active error.

Is hotfix candidate?
no

@yycptt yycptt requested a review from a team January 20, 2022 23:58
},
Input: nil,
WorkflowTaskTimeout: timestamp.DurationPtr(workflowTaskTimeout),
Identity: common.WorkerServiceName + "-service",
Copy link
Contributor

Choose a reason for hiding this comment

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

what about add cluster name in the identity?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea 👍 . Let me check how to get current cluster name here.

Copy link
Contributor

Choose a reason for hiding this comment

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

If it is going to touch many places, I am fine without the cluster name. I just feel it may help with debugging.

Copy link
Member Author

Choose a reason for hiding this comment

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

it's a simply change. I have added current cluster name to processor's params and used it in the identity.

service/worker/parentclosepolicy/workflow.go Show resolved Hide resolved
@yycptt yycptt merged commit e5c7c7c into temporalio:master Jan 26, 2022
@yycptt yycptt deleted the parent-close-policy-remote-cluster branch January 26, 2022 20:40
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