Skip to content

Commit

Permalink
Only replicate user data for multi cluster setups (#4484)
Browse files Browse the repository at this point in the history
  • Loading branch information
bergundy committed Jun 13, 2023
1 parent ea9ad78 commit 71748a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion common/namespace/namespace.go
Expand Up @@ -212,7 +212,9 @@ func (ns *Namespace) FailoverVersion() int64 {
return ns.failoverVersion
}

// IsGlobalNamespace return whether the namespace is a global namespace
// IsGlobalNamespace returns whether the namespace is a global namespace.
// Being a global namespace doesn't necessarily mean that there are multiple registered clusters for it, only that it
// has a failover version. To determine whether operations should be replicated for a namespace, see ReplicationPolicy.
func (ns *Namespace) IsGlobalNamespace() bool {
return ns.isGlobalNamespace
}
Expand Down
2 changes: 1 addition & 1 deletion service/matching/matchingEngine.go
Expand Up @@ -898,7 +898,7 @@ func (e *matchingEngineImpl) UpdateWorkerBuildIdCompatibility(
data.GetVersioningData(),
req.GetRemoveBuildIds().GetBuildIds(),
)
if ns.IsGlobalNamespace() {
if ns.ReplicationPolicy() == namespace.ReplicationPolicyMultiCluster {
operationCreatedTombstones = true
} else {
// We don't need to keep the tombstones around if we're not replicating them.
Expand Down
2 changes: 1 addition & 1 deletion service/matching/taskQueueManager.go
Expand Up @@ -514,7 +514,7 @@ func (c *taskQueueManagerImpl) UpdateUserData(ctx context.Context, options UserD
if err != nil {
return err
}
if !ns.IsGlobalNamespace() {
if ns.ReplicationPolicy() != namespace.ReplicationPolicyMultiCluster {
return nil
}

Expand Down

0 comments on commit 71748a0

Please sign in to comment.