mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 10:08:42 +08:00
enhance: remove fallback keys for config generator (#32946)
Signed-off-by: sunby <sunbingyi1992@gmail.com>
This commit is contained in:
parent
230c88b1de
commit
4724779b3b
@ -70,11 +70,6 @@ func collectRecursive(params *paramtable.ComponentParam, data *[]DocContent, val
|
|||||||
defaultValue := params.GetWithDefault(item.Key, item.DefaultValue)
|
defaultValue := params.GetWithDefault(item.Key, item.DefaultValue)
|
||||||
log.Debug("got key", zap.String("key", item.Key), zap.Any("value", defaultValue), zap.String("variable", val.Type().Field(j).Name))
|
log.Debug("got key", zap.String("key", item.Key), zap.Any("value", defaultValue), zap.String("variable", val.Type().Field(j).Name))
|
||||||
*data = append(*data, DocContent{item.Key, defaultValue, item.Version, refreshable, item.Export, item.Doc})
|
*data = append(*data, DocContent{item.Key, defaultValue, item.Version, refreshable, item.Export, item.Doc})
|
||||||
for _, fk := range item.FallbackKeys {
|
|
||||||
defaultValue = params.GetWithDefault(fk, item.DefaultValue)
|
|
||||||
log.Debug("got fallback key", zap.String("key", fk), zap.Any("value", defaultValue), zap.String("variable", val.Type().Field(j).Name))
|
|
||||||
*data = append(*data, DocContent{fk, defaultValue, item.Version, refreshable, item.Export, item.Doc})
|
|
||||||
}
|
|
||||||
} else if t == "paramtable.ParamGroup" {
|
} else if t == "paramtable.ParamGroup" {
|
||||||
item := subVal.Interface().(paramtable.ParamGroup)
|
item := subVal.Interface().(paramtable.ParamGroup)
|
||||||
log.Debug("got key", zap.String("key", item.KeyPrefix), zap.String("variable", val.Type().Field(j).Name))
|
log.Debug("got key", zap.String("key", item.KeyPrefix), zap.String("variable", val.Type().Field(j).Name))
|
||||||
|
|||||||
@ -68,7 +68,7 @@ tikv:
|
|||||||
tlsCACert: # path to your CACert file
|
tlsCACert: # path to your CACert file
|
||||||
|
|
||||||
localStorage:
|
localStorage:
|
||||||
path: /var/lib/milvus/data/ # please adjust in embedded Milvus: /tmp/milvus/data/
|
path: /tmp/milvus/data/ # please adjust in embedded Milvus: /tmp/milvus/data/
|
||||||
|
|
||||||
# Related configuration of MinIO/S3/GCS or any other service supports S3 API, which is responsible for data persistence for Milvus.
|
# Related configuration of MinIO/S3/GCS or any other service supports S3 API, which is responsible for data persistence for Milvus.
|
||||||
# We refer to the storage service as MinIO/S3 in the following description for simplicity.
|
# We refer to the storage service as MinIO/S3 in the following description for simplicity.
|
||||||
@ -199,7 +199,6 @@ rootCoord:
|
|||||||
proxy:
|
proxy:
|
||||||
timeTickInterval: 200 # ms, the interval that proxy synchronize the time tick
|
timeTickInterval: 200 # ms, the interval that proxy synchronize the time tick
|
||||||
healthCheckTimeout: 3000 # ms, the interval that to do component healthy check
|
healthCheckTimeout: 3000 # ms, the interval that to do component healthy check
|
||||||
healthCheckTimetout: 3000 # ms, the interval that to do component healthy check
|
|
||||||
msgStream:
|
msgStream:
|
||||||
timeTick:
|
timeTick:
|
||||||
bufSize: 512
|
bufSize: 512
|
||||||
@ -336,11 +335,13 @@ queryNode:
|
|||||||
warmup: async
|
warmup: async
|
||||||
mmap:
|
mmap:
|
||||||
mmapEnabled: false # Enable mmap for loading data
|
mmapEnabled: false # Enable mmap for loading data
|
||||||
mmapEnabled: false # Enable mmap for loading data
|
lazyload:
|
||||||
lazyloadEnabled: false # Enable lazyload for loading data
|
enabled: false # Enable lazyload for loading data
|
||||||
lazyloadWaitTimeout: 30000 # max wait timeout duration in milliseconds before start to do lazyload search and retrieve
|
waitTimeout: 30000 # max wait timeout duration in milliseconds before start to do lazyload search and retrieve
|
||||||
lazyLoadRequestResourceTimeout: 5000 # max timeout in milliseconds for waiting request resource for lazy load, 5s by default
|
requestResourceTimeout: 5000 # max timeout in milliseconds for waiting request resource for lazy load, 5s by default
|
||||||
lazyLoadRequestResourceRetryInterval: 2000 # retry interval in milliseconds for waiting request resource for lazy load, 2s by default
|
requestResourceRetryInterval: 2000 # retry interval in milliseconds for waiting request resource for lazy load, 2s by default
|
||||||
|
maxRetryTimes: 1 # max retry times for lazy load, 1 by default
|
||||||
|
maxEvictPerRetry: 1 # max evict count for lazy load, 1 by default
|
||||||
grouping:
|
grouping:
|
||||||
enabled: true
|
enabled: true
|
||||||
maxNQ: 1000
|
maxNQ: 1000
|
||||||
@ -541,8 +542,6 @@ log:
|
|||||||
grpc:
|
grpc:
|
||||||
log:
|
log:
|
||||||
level: WARNING
|
level: WARNING
|
||||||
serverMaxSendSize: 536870912
|
|
||||||
serverMaxRecvSize: 268435456
|
|
||||||
gracefulStopTimeout: 10 # second, time to wait graceful stop finish
|
gracefulStopTimeout: 10 # second, time to wait graceful stop finish
|
||||||
client:
|
client:
|
||||||
compressionEnabled: false
|
compressionEnabled: false
|
||||||
@ -555,8 +554,6 @@ grpc:
|
|||||||
minResetInterval: 1000
|
minResetInterval: 1000
|
||||||
maxCancelError: 32
|
maxCancelError: 32
|
||||||
minSessionCheckInterval: 200
|
minSessionCheckInterval: 200
|
||||||
clientMaxSendSize: 268435456
|
|
||||||
clientMaxRecvSize: 536870912
|
|
||||||
|
|
||||||
# Configure the proxy tls enable.
|
# Configure the proxy tls enable.
|
||||||
tls:
|
tls:
|
||||||
@ -565,18 +562,6 @@ tls:
|
|||||||
caPemPath: configs/cert/ca.pem
|
caPemPath: configs/cert/ca.pem
|
||||||
|
|
||||||
common:
|
common:
|
||||||
chanNamePrefix:
|
|
||||||
cluster: by-dev
|
|
||||||
rootCoordTimeTick: rootcoord-timetick
|
|
||||||
rootCoordStatistics: rootcoord-statistics
|
|
||||||
rootCoordDml: rootcoord-dml
|
|
||||||
replicateMsg: replicate-msg
|
|
||||||
queryTimeTick: queryTimeTick
|
|
||||||
dataCoordTimeTick: datacoord-timetick-channel
|
|
||||||
dataCoordSegmentInfo: segment-info-channel
|
|
||||||
subNamePrefix:
|
|
||||||
dataCoordSubNamePrefix: dataCoord
|
|
||||||
dataNodeSubNamePrefix: dataNode
|
|
||||||
defaultPartitionName: _default # default partition name for a collection
|
defaultPartitionName: _default # default partition name for a collection
|
||||||
defaultIndexName: _default_idx # default index name
|
defaultIndexName: _default_idx # default index name
|
||||||
entityExpiration: -1 # Entity expiration in seconds, CAUTION -1 means never expire
|
entityExpiration: -1 # Entity expiration in seconds, CAUTION -1 means never expire
|
||||||
|
|||||||
@ -273,6 +273,7 @@ func (p *commonConfig) init(base *BaseTable) {
|
|||||||
// --- rootcoord ---
|
// --- rootcoord ---
|
||||||
p.RootCoordTimeTick = ParamItem{
|
p.RootCoordTimeTick = ParamItem{
|
||||||
Key: "msgChannel.chanNamePrefix.rootCoordTimeTick",
|
Key: "msgChannel.chanNamePrefix.rootCoordTimeTick",
|
||||||
|
DefaultValue: "rootcoord-timetick",
|
||||||
Version: "2.1.0",
|
Version: "2.1.0",
|
||||||
FallbackKeys: []string{"common.chanNamePrefix.rootCoordTimeTick"},
|
FallbackKeys: []string{"common.chanNamePrefix.rootCoordTimeTick"},
|
||||||
PanicIfEmpty: true,
|
PanicIfEmpty: true,
|
||||||
@ -283,6 +284,7 @@ func (p *commonConfig) init(base *BaseTable) {
|
|||||||
|
|
||||||
p.RootCoordStatistics = ParamItem{
|
p.RootCoordStatistics = ParamItem{
|
||||||
Key: "msgChannel.chanNamePrefix.rootCoordStatistics",
|
Key: "msgChannel.chanNamePrefix.rootCoordStatistics",
|
||||||
|
DefaultValue: "rootcoord-statistics",
|
||||||
Version: "2.1.0",
|
Version: "2.1.0",
|
||||||
FallbackKeys: []string{"common.chanNamePrefix.rootCoordStatistics"},
|
FallbackKeys: []string{"common.chanNamePrefix.rootCoordStatistics"},
|
||||||
PanicIfEmpty: true,
|
PanicIfEmpty: true,
|
||||||
@ -293,6 +295,7 @@ func (p *commonConfig) init(base *BaseTable) {
|
|||||||
|
|
||||||
p.RootCoordDml = ParamItem{
|
p.RootCoordDml = ParamItem{
|
||||||
Key: "msgChannel.chanNamePrefix.rootCoordDml",
|
Key: "msgChannel.chanNamePrefix.rootCoordDml",
|
||||||
|
DefaultValue: "rootcoord-dml",
|
||||||
Version: "2.1.0",
|
Version: "2.1.0",
|
||||||
FallbackKeys: []string{"common.chanNamePrefix.rootCoordDml"},
|
FallbackKeys: []string{"common.chanNamePrefix.rootCoordDml"},
|
||||||
PanicIfEmpty: true,
|
PanicIfEmpty: true,
|
||||||
@ -303,6 +306,7 @@ func (p *commonConfig) init(base *BaseTable) {
|
|||||||
|
|
||||||
p.ReplicateMsgChannel = ParamItem{
|
p.ReplicateMsgChannel = ParamItem{
|
||||||
Key: "msgChannel.chanNamePrefix.replicateMsg",
|
Key: "msgChannel.chanNamePrefix.replicateMsg",
|
||||||
|
DefaultValue: "replicate-msg",
|
||||||
Version: "2.3.2",
|
Version: "2.3.2",
|
||||||
FallbackKeys: []string{"common.chanNamePrefix.replicateMsg"},
|
FallbackKeys: []string{"common.chanNamePrefix.replicateMsg"},
|
||||||
PanicIfEmpty: true,
|
PanicIfEmpty: true,
|
||||||
@ -313,6 +317,7 @@ func (p *commonConfig) init(base *BaseTable) {
|
|||||||
|
|
||||||
p.QueryCoordTimeTick = ParamItem{
|
p.QueryCoordTimeTick = ParamItem{
|
||||||
Key: "msgChannel.chanNamePrefix.queryTimeTick",
|
Key: "msgChannel.chanNamePrefix.queryTimeTick",
|
||||||
|
DefaultValue: "queryTimeTick",
|
||||||
Version: "2.1.0",
|
Version: "2.1.0",
|
||||||
FallbackKeys: []string{"common.chanNamePrefix.queryTimeTick"},
|
FallbackKeys: []string{"common.chanNamePrefix.queryTimeTick"},
|
||||||
PanicIfEmpty: true,
|
PanicIfEmpty: true,
|
||||||
@ -323,6 +328,7 @@ func (p *commonConfig) init(base *BaseTable) {
|
|||||||
|
|
||||||
p.DataCoordTimeTick = ParamItem{
|
p.DataCoordTimeTick = ParamItem{
|
||||||
Key: "msgChannel.chanNamePrefix.dataCoordTimeTick",
|
Key: "msgChannel.chanNamePrefix.dataCoordTimeTick",
|
||||||
|
DefaultValue: "datacoord-timetick-channel",
|
||||||
Version: "2.1.0",
|
Version: "2.1.0",
|
||||||
FallbackKeys: []string{"common.chanNamePrefix.dataCoordTimeTick"},
|
FallbackKeys: []string{"common.chanNamePrefix.dataCoordTimeTick"},
|
||||||
PanicIfEmpty: true,
|
PanicIfEmpty: true,
|
||||||
@ -333,6 +339,7 @@ func (p *commonConfig) init(base *BaseTable) {
|
|||||||
|
|
||||||
p.DataCoordSegmentInfo = ParamItem{
|
p.DataCoordSegmentInfo = ParamItem{
|
||||||
Key: "msgChannel.chanNamePrefix.dataCoordSegmentInfo",
|
Key: "msgChannel.chanNamePrefix.dataCoordSegmentInfo",
|
||||||
|
DefaultValue: "segment-info-channel",
|
||||||
Version: "2.1.0",
|
Version: "2.1.0",
|
||||||
FallbackKeys: []string{"common.chanNamePrefix.dataCoordSegmentInfo"},
|
FallbackKeys: []string{"common.chanNamePrefix.dataCoordSegmentInfo"},
|
||||||
PanicIfEmpty: true,
|
PanicIfEmpty: true,
|
||||||
@ -343,6 +350,7 @@ func (p *commonConfig) init(base *BaseTable) {
|
|||||||
|
|
||||||
p.DataCoordSubName = ParamItem{
|
p.DataCoordSubName = ParamItem{
|
||||||
Key: "msgChannel.subNamePrefix.dataCoordSubNamePrefix",
|
Key: "msgChannel.subNamePrefix.dataCoordSubNamePrefix",
|
||||||
|
DefaultValue: "dataCoord",
|
||||||
Version: "2.1.0",
|
Version: "2.1.0",
|
||||||
FallbackKeys: []string{"common.subNamePrefix.dataCoordSubNamePrefix"},
|
FallbackKeys: []string{"common.subNamePrefix.dataCoordSubNamePrefix"},
|
||||||
PanicIfEmpty: true,
|
PanicIfEmpty: true,
|
||||||
@ -369,6 +377,7 @@ func (p *commonConfig) init(base *BaseTable) {
|
|||||||
|
|
||||||
p.DataNodeSubName = ParamItem{
|
p.DataNodeSubName = ParamItem{
|
||||||
Key: "msgChannel.subNamePrefix.dataNodeSubNamePrefix",
|
Key: "msgChannel.subNamePrefix.dataNodeSubNamePrefix",
|
||||||
|
DefaultValue: "dataNode",
|
||||||
Version: "2.1.0",
|
Version: "2.1.0",
|
||||||
FallbackKeys: []string{"common.subNamePrefix.dataNodeSubNamePrefix"},
|
FallbackKeys: []string{"common.subNamePrefix.dataNodeSubNamePrefix"},
|
||||||
PanicIfEmpty: true,
|
PanicIfEmpty: true,
|
||||||
@ -2255,7 +2264,7 @@ func (p *queryNodeConfig) init(base *BaseTable) {
|
|||||||
p.MmapEnabled.Init(base.mgr)
|
p.MmapEnabled.Init(base.mgr)
|
||||||
|
|
||||||
p.LazyLoadEnabled = ParamItem{
|
p.LazyLoadEnabled = ParamItem{
|
||||||
Key: "queryNode.lazyloadEnabled",
|
Key: "queryNode.lazyload.enabled",
|
||||||
Version: "2.4.2",
|
Version: "2.4.2",
|
||||||
DefaultValue: "false",
|
DefaultValue: "false",
|
||||||
Doc: "Enable lazyload for loading data",
|
Doc: "Enable lazyload for loading data",
|
||||||
@ -2263,7 +2272,7 @@ func (p *queryNodeConfig) init(base *BaseTable) {
|
|||||||
}
|
}
|
||||||
p.LazyLoadEnabled.Init(base.mgr)
|
p.LazyLoadEnabled.Init(base.mgr)
|
||||||
p.LazyLoadWaitTimeout = ParamItem{
|
p.LazyLoadWaitTimeout = ParamItem{
|
||||||
Key: "queryNode.lazyloadWaitTimeout",
|
Key: "queryNode.lazyload.waitTimeout",
|
||||||
Version: "2.4.2",
|
Version: "2.4.2",
|
||||||
DefaultValue: "30000",
|
DefaultValue: "30000",
|
||||||
Doc: "max wait timeout duration in milliseconds before start to do lazyload search and retrieve",
|
Doc: "max wait timeout duration in milliseconds before start to do lazyload search and retrieve",
|
||||||
@ -2271,7 +2280,7 @@ func (p *queryNodeConfig) init(base *BaseTable) {
|
|||||||
}
|
}
|
||||||
p.LazyLoadWaitTimeout.Init(base.mgr)
|
p.LazyLoadWaitTimeout.Init(base.mgr)
|
||||||
p.LazyLoadRequestResourceTimeout = ParamItem{
|
p.LazyLoadRequestResourceTimeout = ParamItem{
|
||||||
Key: "queryNode.lazyLoadRequestResourceTimeout",
|
Key: "queryNode.lazyload.requestResourceTimeout",
|
||||||
Version: "2.4.2",
|
Version: "2.4.2",
|
||||||
DefaultValue: "5000",
|
DefaultValue: "5000",
|
||||||
Doc: "max timeout in milliseconds for waiting request resource for lazy load, 5s by default",
|
Doc: "max timeout in milliseconds for waiting request resource for lazy load, 5s by default",
|
||||||
@ -2279,7 +2288,7 @@ func (p *queryNodeConfig) init(base *BaseTable) {
|
|||||||
}
|
}
|
||||||
p.LazyLoadRequestResourceTimeout.Init(base.mgr)
|
p.LazyLoadRequestResourceTimeout.Init(base.mgr)
|
||||||
p.LazyLoadRequestResourceRetryInterval = ParamItem{
|
p.LazyLoadRequestResourceRetryInterval = ParamItem{
|
||||||
Key: "queryNode.lazyLoadRequestResourceRetryInterval",
|
Key: "queryNode.lazyload.requestResourceRetryInterval",
|
||||||
Version: "2.4.2",
|
Version: "2.4.2",
|
||||||
DefaultValue: "2000",
|
DefaultValue: "2000",
|
||||||
Doc: "retry interval in milliseconds for waiting request resource for lazy load, 2s by default",
|
Doc: "retry interval in milliseconds for waiting request resource for lazy load, 2s by default",
|
||||||
@ -2288,7 +2297,7 @@ func (p *queryNodeConfig) init(base *BaseTable) {
|
|||||||
p.LazyLoadRequestResourceRetryInterval.Init(base.mgr)
|
p.LazyLoadRequestResourceRetryInterval.Init(base.mgr)
|
||||||
|
|
||||||
p.LazyLoadMaxRetryTimes = ParamItem{
|
p.LazyLoadMaxRetryTimes = ParamItem{
|
||||||
Key: "queryNode.lazyLoadMaxRetryTimes",
|
Key: "queryNode.lazyload.maxRetryTimes",
|
||||||
Version: "2.4.2",
|
Version: "2.4.2",
|
||||||
DefaultValue: "1",
|
DefaultValue: "1",
|
||||||
Doc: "max retry times for lazy load, 1 by default",
|
Doc: "max retry times for lazy load, 1 by default",
|
||||||
@ -2297,7 +2306,7 @@ func (p *queryNodeConfig) init(base *BaseTable) {
|
|||||||
p.LazyLoadMaxRetryTimes.Init(base.mgr)
|
p.LazyLoadMaxRetryTimes.Init(base.mgr)
|
||||||
|
|
||||||
p.LazyLoadMaxEvictPerRetry = ParamItem{
|
p.LazyLoadMaxEvictPerRetry = ParamItem{
|
||||||
Key: "queryNode.lazyLoadMaxEvictPerRetry",
|
Key: "queryNode.lazyload.maxEvictPerRetry",
|
||||||
Version: "2.4.2",
|
Version: "2.4.2",
|
||||||
DefaultValue: "1",
|
DefaultValue: "1",
|
||||||
Doc: "max evict count for lazy load, 1 by default",
|
Doc: "max evict count for lazy load, 1 by default",
|
||||||
|
|||||||
@ -387,19 +387,19 @@ func TestComponentParam(t *testing.T) {
|
|||||||
assert.Equal(t, int64(70*1024*1024), Params.DiskCacheCapacityLimit.GetAsSize())
|
assert.Equal(t, int64(70*1024*1024), Params.DiskCacheCapacityLimit.GetAsSize())
|
||||||
|
|
||||||
assert.False(t, Params.LazyLoadEnabled.GetAsBool())
|
assert.False(t, Params.LazyLoadEnabled.GetAsBool())
|
||||||
params.Save("queryNode.lazyloadEnabled", "true")
|
params.Save("queryNode.lazyload.enabled", "true")
|
||||||
assert.True(t, Params.LazyLoadEnabled.GetAsBool())
|
assert.True(t, Params.LazyLoadEnabled.GetAsBool())
|
||||||
|
|
||||||
assert.Equal(t, 30*time.Second, Params.LazyLoadWaitTimeout.GetAsDuration(time.Millisecond))
|
assert.Equal(t, 30*time.Second, Params.LazyLoadWaitTimeout.GetAsDuration(time.Millisecond))
|
||||||
params.Save("queryNode.lazyloadWaitTimeout", "100")
|
params.Save("queryNode.lazyload.waitTimeout", "100")
|
||||||
assert.Equal(t, 100*time.Millisecond, Params.LazyLoadWaitTimeout.GetAsDuration(time.Millisecond))
|
assert.Equal(t, 100*time.Millisecond, Params.LazyLoadWaitTimeout.GetAsDuration(time.Millisecond))
|
||||||
|
|
||||||
assert.Equal(t, 5*time.Second, Params.LazyLoadRequestResourceTimeout.GetAsDuration(time.Millisecond))
|
assert.Equal(t, 5*time.Second, Params.LazyLoadRequestResourceTimeout.GetAsDuration(time.Millisecond))
|
||||||
params.Save("queryNode.lazyLoadRequestResourceTimeout", "100")
|
params.Save("queryNode.lazyload.requestResourceTimeout", "100")
|
||||||
assert.Equal(t, 100*time.Millisecond, Params.LazyLoadRequestResourceTimeout.GetAsDuration(time.Millisecond))
|
assert.Equal(t, 100*time.Millisecond, Params.LazyLoadRequestResourceTimeout.GetAsDuration(time.Millisecond))
|
||||||
|
|
||||||
assert.Equal(t, 2*time.Second, Params.LazyLoadRequestResourceRetryInterval.GetAsDuration(time.Millisecond))
|
assert.Equal(t, 2*time.Second, Params.LazyLoadRequestResourceRetryInterval.GetAsDuration(time.Millisecond))
|
||||||
params.Save("queryNode.lazyLoadRequestResourceRetryInterval", "3000")
|
params.Save("queryNode.lazyload.requestResourceRetryInterval", "3000")
|
||||||
assert.Equal(t, 3*time.Second, Params.LazyLoadRequestResourceRetryInterval.GetAsDuration(time.Millisecond))
|
assert.Equal(t, 3*time.Second, Params.LazyLoadRequestResourceRetryInterval.GetAsDuration(time.Millisecond))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user