-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add workflowId parameter to namespace.ActiveClusterName api. #8740
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
base: main
Are you sure you want to change the base?
Conversation
| if ns.IsGlobalNamespace() && | ||
| ns.ReplicationPolicy() == namespace.ReplicationPolicyMultiCluster && | ||
| ns.ActiveClusterName() == e.currentClusterName { | ||
| ns.ActiveInCluster(e.currentClusterName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to think more about this. I am not sure if this is correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From code semantic, it is correct, because ActiveInCluster underlying calling ns.ActiveClusterName api. From logic perspective, you are right to question this. This is to detect the when the current cluster become active. We will introduce ns.StateChanged API to handle this case instead of using ns.ActiveClusterName.
| } | ||
|
|
||
| return namespaceEntry.ActiveClusterName(), true | ||
| return namespaceEntry.ActiveClusterName(""), true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
emptyWorkflowId here?
What changed?
Add workflowId parameter to namespace.ActiveClusterName api
Why?
So we can have different replication config for different workflowId.
How did you test it?
Potential risks
No risk.