fix enable automatic discovery with '@'
v4
muicoder 5 years ago committed by GitHub
parent 58db0e995b
commit 8cb69787b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/redis-shake/common/configure.go

@ -108,7 +108,7 @@ func parseAddress(tp, address, redisType string, isSource bool) error {
if isSource && arr[0] != conf.StandAloneRoleSlave && arr[0] != conf.StandAloneRoleMaster {
return fmt.Errorf("source redis role must be master or slave, when enable automatic discovery with '@'")
}
if !isSource && arr[0] != "master" {
if !isSource && arr[0] != "master" && arr[0] != "" {
return fmt.Errorf("target redis role must be master, when enable automatic discovery with '@'")
}
@ -167,4 +167,4 @@ func setAddressList(isSource bool, address string) {
} else {
conf.Options.TargetAddressList = strings.Split(address, AddressClusterSplitter)
}
}
}

Loading…
Cancel
Save