Skip to content

Conversation

alexshtin
Copy link
Contributor

@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
@alexshtin alexshtin force-pushed the feature/source-side-filter branch from 7089d94 to dffd2aa Compare December 2, 2022 01:28

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
Contributor 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