fix: channel name can not contains '-partition-' (#28689)

issue: https://github.com/milvus-io/milvus/issues/28675

Signed-off-by: sunby <sunbingyi1992@gmail.com>
pull/28696/head
Bingyi Sun 2023-11-24 10:14:24 +08:00 committed by GitHub
parent 3199da3b77
commit 2843664a20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -237,8 +237,14 @@ func (p *commonConfig) init(base *BaseTable) {
}
p.ClusterPrefix.Init(base.mgr)
pulsarPartitionKeyword := "-partition-"
chanNamePrefix := func(prefix string) string {
return strings.Join([]string{p.ClusterPrefix.GetValue(), prefix}, "-")
str := strings.Join([]string{p.ClusterPrefix.GetValue(), prefix}, "-")
if strings.Contains(str, pulsarPartitionKeyword) {
// there is a bug in pulsar client go, please refer to https://github.com/milvus-io/milvus/issues/28675
panic("channel name can not contains '-partition-'")
}
return str
}
// --- rootcoord ---