-
Notifications
You must be signed in to change notification settings - Fork 814
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
Deprecate clustersInfo configuration in favor of new clusterMetadata… #1809
Conversation
27d3eff
to
24305cd
Compare
…ion configuration, which provides better flexbility
24305cd
to
eb6742a
Compare
eebceb7
to
c5b1d06
Compare
common/service/config/config.go
Outdated
Address struct { | ||
// RPCName indicate the remote service name | ||
RPCName string `yaml:"rpcName"` | ||
// Address indicate the remote service IP address | ||
RPCAddress string `yaml:"rpcAddress"` | ||
} | ||
|
||
// ClustersInformation contains the all cluster which participated in cross DC | ||
ClustersInformation struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use any other name other than ClustersInfomation. The reason is you also have ClusterInfomation and they look too similar, it is not eyeball-friendly. For example: GlobalReplicationConfig
@@ -219,6 +222,8 @@ type ( | |||
} | |||
|
|||
// ClustersInfo contains the all cluster names and active cluster | |||
// | |||
// Deprecated: please use ClusterInformation instead | |||
ClustersInfo struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not that hard for external customer to change their config, unlike RPC IDL.
I would recommend to remove all configs in ClustersInfo(make it an empty struct) and keep our code simple, and panic if ClustersInfo is specified.
common/service/config/config.go
Outdated
ClustersInformation struct { | ||
EnableGlobalDomain bool `yaml:"enableGlobalDomain"` | ||
// VersionIncrement is the increment of each cluster version when failover happens | ||
VersionIncrement int64 `yaml:"versionIncrement"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go back to FailoverVersionIncrement as we said
cmd/server/server.go
Outdated
s.cfg.ClustersInfo.ClusterInitialFailoverVersions, | ||
s.cfg.ClustersInfo.ClusterAddress, | ||
dc.GetBoolProperty(dynamicconfig.EnableGlobalDomain, clustersInformation.EnableGlobalDomain), | ||
clustersInformation.VersionIncrement, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename back for all: version->failoverVersion to be consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some small comments
… configuration, which provides better flexibility
New config change allows a cluster to be disabled, which can be useful for cluster migration using cross DC
Before:
After: