817
updateDBRecord = true
818
}
819
>
if currentClusterDBRecord.ClusterAddress != currentCLusterInfo.RPCAddress {
fx.go
820
currentClusterDBRecord.ClusterAddress = currentCLusterInfo.RPCAddress
821
updateDBRecord = true
822
}
823
>
if currentClusterDBRecord.HttpAddress != currentCLusterInfo.HTTPAddress {
fx.go
824
currentClusterDBRecord.HttpAddress = currentCLusterInfo.HTTPAddress
825
updateDBRecord = true
826
}
827
>
if !maps.Equal(currentClusterDBRecord.Tags, svc.ClusterMetadata.Tags) {
fx.go
828
currentClusterDBRecord.Tags = svc.ClusterMetadata.Tags
829
updateDBRecord = true
830
}
831
832
>
if updateIndexSearchAttributes(initialIndexSearchAttributes, currentClusterDBRecord) {
fx.go
833
updateDBRecord = true
834
}
835
836
>
if !updateDBRecord {
fx.go
837
return nil
838
}
839
840
>
applied, err := clusterMetadataManager.SaveClusterMetadata(
fx.go
841
>
ctx,
842
>
&persistence.SaveClusterMetadataRequest{
843
>
ClusterMetadata: currentClusterDBRecord.ClusterMetadata,
844
>
Version: currentClusterDBRecord.Version,
845
>
})
846
>
if !applied || err != nil {
847
return fmt.Errorf("error while updating cluster metadata: %w", err)
848
}
850
}
851