add judgement about truncate for 'NameBelongsToCluster'
This commit is contained in:
parent
0d80f0db33
commit
50e7c19b5f
1 changed files with 7 additions and 1 deletions
|
@ -206,8 +206,14 @@ func (n *Namer) NameBelongsToCluster(name string) bool {
|
|||
glog.Warningf("Too many parts to name %v, ignoring", name)
|
||||
return false
|
||||
}
|
||||
|
||||
if len(name) > nameLenLimit {
|
||||
glog.V(4).Infof("%s has been truncated", name)
|
||||
return strings.HasPrefix(clusterName, strings.TrimSuffix(parts[1], alphaNumericChar))
|
||||
}else{
|
||||
return parts[1] == clusterName
|
||||
}
|
||||
}
|
||||
|
||||
// BeName constructs the name for a backend.
|
||||
func (n *Namer) BeName(port int64) string {
|
||||
|
|
Loading…
Reference in a new issue