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

Filter replication task on source cluster #3641

Merged
merged 5 commits into from
Dec 10, 2022

Conversation

alexshtin
Copy link
Member

@alexshtin alexshtin commented Nov 22, 2022

What changed?
Filter replication tasks on source cluster.

Why?
The source cluster should skip replication tasks, if the destination (calling) cluster is not in the cluster list for the task namespace.

How did you test it?
Added new unit tests and validated locally with 3 clusters setup.

Potential risks
No risks.

Is hotfix candidate?
No.

@alexshtin alexshtin marked this pull request as ready for review November 22, 2022 22:36
@alexshtin alexshtin requested a review from a team as a code owner November 22, 2022 22:36

ns, err := p.namespaceRegistry.GetNamespaceByID(namespace.ID(task.GetNamespaceID()))
if err != nil {
if _, isNotFound := err.(*serviceerror.NamespaceNotFound); !isNotFound {
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible that this could happen after host restart and before ns refresh fetched the namespace info?

Copy link
Member Author

Choose a reason for hiding this comment

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

First call to load namespaces is from registry.Start method, which is blocking and called by fx during container is getting built.

@alexshtin alexshtin merged commit ae223cf into temporalio:master Dec 10, 2022
@alexshtin alexshtin deleted the feature/source-side-filter branch December 10, 2022 01:27
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.

3 participants