-
Notifications
You must be signed in to change notification settings - Fork 805
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
Replicate domain #586
Replicate domain #586
Conversation
e3ccb0e
to
ac69497
Compare
… update domain transfer task add is global domain for domain add domain replication logic
ac69497
to
cd9b9c0
Compare
@@ -46,8 +46,10 @@ services: | |||
port: 7937 | |||
|
|||
clustersInfo: | |||
enableGlobalDomain: false |
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 have enableGlobalDomain and masterClusterName as dynamic config knobs?
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 me do a separate PR just for dynamic config integration
@@ -0,0 +1,8 @@ | |||
{ |
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 have these schema changes as part of v0.5? We haven't released that yet.
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.
we have not release that yet, however, 0.5 is rolled out to staging.
we can definitely do some manual work on staging.
let me know your preference
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.
fixed, changed to 0.5
|
||
// whether active cluster is changed | ||
activeClusterChanged := false | ||
// whether anything other than active cluster is changed | ||
configurationChanged := false | ||
|
||
validateReplicationConfig := func(existingDomain *persistence.GetDomainResponse, |
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.
nit: Why this validation is defined as a closure? Can we just have a validation function defined on the handler like we do for all different kind of validation?
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.
the reason i put this validation as a closure: this function is not reusable, by other logics.
Plus this closure captured a lot of variables.
if i change this to a dedicated function, than the number of return values will be > 4.
service/frontend/handler.go
Outdated
for _, cluster := range replicationConfig.Clusters { | ||
if cluster.ClusterName == replicationConfig.ActiveClusterName { | ||
activeClusterInClusters = true | ||
break |
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.
one coding practice we follow is to always use label when breaking out of loops.
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.
ok sure
79a40cf
to
81eda35
Compare
solve #569