Skip to content

Commit

Permalink
Allow update cluster address
Browse files Browse the repository at this point in the history
  • Loading branch information
meiliang86 committed Jun 10, 2022
1 parent 05a90f8 commit 3ba4865
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion temporal/fx.go
Expand Up @@ -639,11 +639,13 @@ func ApplyClusterMetadataConfigProvider(
}

// Allow updating cluster metadata if global namespace is disabled
if !resp.IsGlobalNamespaceEnabled && clusterData.EnableGlobalNamespace {
if (!resp.IsGlobalNamespaceEnabled && clusterData.EnableGlobalNamespace) ||
resp.ClusterAddress != clusterInfo.RPCAddress {
currentMetadata := resp.ClusterMetadata
currentMetadata.IsGlobalNamespaceEnabled = clusterData.EnableGlobalNamespace
currentMetadata.InitialFailoverVersion = clusterInfo.InitialFailoverVersion
currentMetadata.FailoverVersionIncrement = clusterData.FailoverVersionIncrement
currentMetadata.ClusterAddress = clusterInfo.RPCAddress

applied, err = clusterMetadataManager.SaveClusterMetadata(
ctx,
Expand Down

0 comments on commit 3ba4865

Please sign in to comment.