Skip to content

Commit

Permalink
enhance: adding the msgchannel section in generated yaml (milvus-io#3…
Browse files Browse the repository at this point in the history
…5466)

See milvus-io#32168

Signed-off-by: Ted Xu <ted.xu@zilliz.com>
  • Loading branch information
tedxu committed Aug 14, 2024
1 parent 573de28 commit 57d4bcb
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 16 deletions.
4 changes: 4 additions & 0 deletions cmd/tools/config/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ func WriteYaml(w io.Writer) {
{
name: "dataNode",
},
{
name: "msgChannel",
header: "\n# This topic introduces the message channel-related configurations of Milvus.",
},
{
name: "log",
header: "\n# Configures the system log output.",
Expand Down
48 changes: 48 additions & 0 deletions configs/milvus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,54 @@ dataNode:
clientMaxSendSize: 268435456 # The maximum size of each RPC request that the clients on dataNode can send, unit: byte
clientMaxRecvSize: 536870912 # The maximum size of each RPC request that the clients on dataNode can receive, unit: byte

# This topic introduces the message channel-related configurations of Milvus.
msgChannel:
chanNamePrefix:
# Root name prefix of the channel when a message channel is created.
# It is recommended to change this parameter before starting Milvus for the first time.
# To share a Pulsar instance among multiple Milvus instances, consider changing this to a name rather than the default one for each Milvus instance before you start them.
cluster: by-dev
# Sub-name prefix of the message channel where the root coord publishes time tick messages.
# The complete channel name prefix is ${msgChannel.chanNamePrefix.cluster}-${msgChannel.chanNamePrefix.rootCoordTimeTick}
# Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
# It is recommended to change this parameter before starting Milvus for the first time.
rootCoordTimeTick: rootcoord-timetick
# Sub-name prefix of the message channel where the root coord publishes its own statistics messages.
# The complete channel name prefix is ${msgChannel.chanNamePrefix.cluster}-${msgChannel.chanNamePrefix.rootCoordStatistics}
# Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
# It is recommended to change this parameter before starting Milvus for the first time.
rootCoordStatistics: rootcoord-statistics
# Sub-name prefix of the message channel where the root coord publishes Data Manipulation Language (DML) messages.
# The complete channel name prefix is ${msgChannel.chanNamePrefix.cluster}-${msgChannel.chanNamePrefix.rootCoordDml}
# Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
# It is recommended to change this parameter before starting Milvus for the first time.
rootCoordDml: rootcoord-dml
replicateMsg: replicate-msg
# Sub-name prefix of the message channel where the query node publishes time tick messages.
# The complete channel name prefix is ${msgChannel.chanNamePrefix.cluster}-${msgChannel.chanNamePrefix.queryTimeTick}
# Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
# It is recommended to change this parameter before starting Milvus for the first time.
queryTimeTick: queryTimeTick
# Sub-name prefix of the message channel where the data coord publishes time tick messages.
# The complete channel name prefix is ${msgChannel.chanNamePrefix.cluster}-${msgChannel.chanNamePrefix.dataCoordTimeTick}
# Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
# It is recommended to change this parameter before starting Milvus for the first time.
dataCoordTimeTick: datacoord-timetick-channel
# Sub-name prefix of the message channel where the data coord publishes segment information messages.
# The complete channel name prefix is ${msgChannel.chanNamePrefix.cluster}-${msgChannel.chanNamePrefix.dataCoordSegmentInfo}
# Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
# It is recommended to change this parameter before starting Milvus for the first time.
dataCoordSegmentInfo: segment-info-channel
subNamePrefix:
# Subscription name prefix of the data coord.
# Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
# It is recommended to change this parameter before starting Milvus for the first time.
dataCoordSubNamePrefix: dataCoord
# Subscription name prefix of the data node.
# Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
# It is recommended to change this parameter before starting Milvus for the first time.
dataNodeSubNamePrefix: dataNode

# Configures the system log output.
log:
# Milvus log level. Option: debug, info, warn, error, panic, and fatal.
Expand Down
65 changes: 49 additions & 16 deletions pkg/util/paramtable/component_param.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ func (p *commonConfig) init(base *BaseTable) {
Version: "2.1.0",
FallbackKeys: []string{"common.chanNamePrefix.cluster"},
DefaultValue: "by-dev",
Doc: `Root name prefix of the channel when a message channel is created.
It is recommended to change this parameter before starting Milvus for the first time.
To share a Pulsar instance among multiple Milvus instances, consider changing this to a name rather than the default one for each Milvus instance before you start them.`,
PanicIfEmpty: true,
Forbidden: true,
Export: true,
Expand All @@ -291,8 +294,12 @@ func (p *commonConfig) init(base *BaseTable) {
Version: "2.1.0",
FallbackKeys: []string{"common.chanNamePrefix.rootCoordTimeTick"},
PanicIfEmpty: true,
Formatter: chanNamePrefix,
Export: true,
Doc: `Sub-name prefix of the message channel where the root coord publishes time tick messages.
The complete channel name prefix is ${msgChannel.chanNamePrefix.cluster}-${msgChannel.chanNamePrefix.rootCoordTimeTick}
Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
It is recommended to change this parameter before starting Milvus for the first time.`,
Formatter: chanNamePrefix,
Export: true,
}
p.RootCoordTimeTick.Init(base.mgr)

Expand All @@ -302,8 +309,12 @@ func (p *commonConfig) init(base *BaseTable) {
Version: "2.1.0",
FallbackKeys: []string{"common.chanNamePrefix.rootCoordStatistics"},
PanicIfEmpty: true,
Formatter: chanNamePrefix,
Export: true,
Doc: `Sub-name prefix of the message channel where the root coord publishes its own statistics messages.
The complete channel name prefix is ${msgChannel.chanNamePrefix.cluster}-${msgChannel.chanNamePrefix.rootCoordStatistics}
Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
It is recommended to change this parameter before starting Milvus for the first time.`,
Formatter: chanNamePrefix,
Export: true,
}
p.RootCoordStatistics.Init(base.mgr)

Expand All @@ -313,8 +324,12 @@ func (p *commonConfig) init(base *BaseTable) {
Version: "2.1.0",
FallbackKeys: []string{"common.chanNamePrefix.rootCoordDml"},
PanicIfEmpty: true,
Formatter: chanNamePrefix,
Export: true,
Doc: `Sub-name prefix of the message channel where the root coord publishes Data Manipulation Language (DML) messages.
The complete channel name prefix is ${msgChannel.chanNamePrefix.cluster}-${msgChannel.chanNamePrefix.rootCoordDml}
Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
It is recommended to change this parameter before starting Milvus for the first time.`,
Formatter: chanNamePrefix,
Export: true,
}
p.RootCoordDml.Init(base.mgr)

Expand All @@ -335,8 +350,12 @@ func (p *commonConfig) init(base *BaseTable) {
Version: "2.1.0",
FallbackKeys: []string{"common.chanNamePrefix.queryTimeTick"},
PanicIfEmpty: true,
Formatter: chanNamePrefix,
Export: true,
Doc: `Sub-name prefix of the message channel where the query node publishes time tick messages.
The complete channel name prefix is ${msgChannel.chanNamePrefix.cluster}-${msgChannel.chanNamePrefix.queryTimeTick}
Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
It is recommended to change this parameter before starting Milvus for the first time.`,
Formatter: chanNamePrefix,
Export: true,
}
p.QueryCoordTimeTick.Init(base.mgr)

Expand All @@ -346,8 +365,12 @@ func (p *commonConfig) init(base *BaseTable) {
Version: "2.1.0",
FallbackKeys: []string{"common.chanNamePrefix.dataCoordTimeTick"},
PanicIfEmpty: true,
Formatter: chanNamePrefix,
Export: true,
Doc: `Sub-name prefix of the message channel where the data coord publishes time tick messages.
The complete channel name prefix is ${msgChannel.chanNamePrefix.cluster}-${msgChannel.chanNamePrefix.dataCoordTimeTick}
Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
It is recommended to change this parameter before starting Milvus for the first time.`,
Formatter: chanNamePrefix,
Export: true,
}
p.DataCoordTimeTick.Init(base.mgr)

Expand All @@ -357,8 +380,12 @@ func (p *commonConfig) init(base *BaseTable) {
Version: "2.1.0",
FallbackKeys: []string{"common.chanNamePrefix.dataCoordSegmentInfo"},
PanicIfEmpty: true,
Formatter: chanNamePrefix,
Export: true,
Doc: `Sub-name prefix of the message channel where the data coord publishes segment information messages.
The complete channel name prefix is ${msgChannel.chanNamePrefix.cluster}-${msgChannel.chanNamePrefix.dataCoordSegmentInfo}
Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
It is recommended to change this parameter before starting Milvus for the first time.`,
Formatter: chanNamePrefix,
Export: true,
}
p.DataCoordSegmentInfo.Init(base.mgr)

Expand All @@ -368,8 +395,11 @@ func (p *commonConfig) init(base *BaseTable) {
Version: "2.1.0",
FallbackKeys: []string{"common.subNamePrefix.dataCoordSubNamePrefix"},
PanicIfEmpty: true,
Formatter: chanNamePrefix,
Export: true,
Doc: `Subscription name prefix of the data coord.
Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
It is recommended to change this parameter before starting Milvus for the first time.`,
Formatter: chanNamePrefix,
Export: true,
}
p.DataCoordSubName.Init(base.mgr)

Expand All @@ -395,8 +425,11 @@ func (p *commonConfig) init(base *BaseTable) {
Version: "2.1.0",
FallbackKeys: []string{"common.subNamePrefix.dataNodeSubNamePrefix"},
PanicIfEmpty: true,
Formatter: chanNamePrefix,
Export: true,
Doc: `Subscription name prefix of the data node.
Caution: Changing this parameter after using Milvus for a period of time will affect your access to old data.
It is recommended to change this parameter before starting Milvus for the first time.`,
Formatter: chanNamePrefix,
Export: true,
}
p.DataNodeSubName.Init(base.mgr)

Expand Down

0 comments on commit 57d4bcb

Please sign in to comment.