Delete useless config (#26173)

Signed-off-by: xige-16 <xi.ge@zilliz.com>
This commit is contained in:
xige-16 2023-08-08 10:23:08 +08:00 committed by GitHub
parent a7eecb1be0
commit d1d0169fa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 116 deletions

View File

@ -195,10 +195,7 @@ func (s *Server) getSystemInfoMetrics(
Type: typeutil.QueryCoordRole,
ID: paramtable.GetNodeID(),
},
SystemConfigurations: metricsinfo.QueryCoordConfiguration{
SearchChannelPrefix: Params.CommonCfg.QueryCoordSearch.GetValue(),
SearchResultChannelPrefix: Params.CommonCfg.QueryCoordSearchResult.GetValue(),
},
SystemConfigurations: metricsinfo.QueryCoordConfiguration{},
},
ConnectedNodes: make([]metricsinfo.QueryNodeInfos, 0),
}

View File

@ -1602,9 +1602,7 @@ func TestRootcoord_EnableActiveStandby(t *testing.T) {
paramtable.Get().Save(Params.RootCoordCfg.EnableActiveStandby.Key, "true")
paramtable.Get().Save(Params.CommonCfg.RootCoordTimeTick.Key, fmt.Sprintf("rootcoord-time-tick-%d", randVal))
paramtable.Get().Save(Params.CommonCfg.RootCoordStatistics.Key, fmt.Sprintf("rootcoord-statistics-%d", randVal))
paramtable.Get().Save(Params.CommonCfg.RootCoordSubName.Key, fmt.Sprintf("subname-%d", randVal))
paramtable.Get().Save(Params.CommonCfg.RootCoordDml.Key, fmt.Sprintf("rootcoord-dml-test-%d", randVal))
paramtable.Get().Save(Params.CommonCfg.RootCoordDelta.Key, fmt.Sprintf("rootcoord-delta-test-%d", randVal))
ctx := context.Background()
coreFactory := dependency.NewDefaultFactory(true)
@ -1652,9 +1650,7 @@ func TestRootcoord_DisableActiveStandby(t *testing.T) {
paramtable.Get().Save(Params.RootCoordCfg.EnableActiveStandby.Key, "false")
paramtable.Get().Save(Params.CommonCfg.RootCoordTimeTick.Key, fmt.Sprintf("rootcoord-time-tick-%d", randVal))
paramtable.Get().Save(Params.CommonCfg.RootCoordStatistics.Key, fmt.Sprintf("rootcoord-statistics-%d", randVal))
paramtable.Get().Save(Params.CommonCfg.RootCoordSubName.Key, fmt.Sprintf("subname-%d", randVal))
paramtable.Get().Save(Params.CommonCfg.RootCoordDml.Key, fmt.Sprintf("rootcoord-dml-test-%d", randVal))
paramtable.Get().Save(Params.CommonCfg.RootCoordDelta.Key, fmt.Sprintf("rootcoord-delta-test-%d", randVal))
ctx := context.Background()
coreFactory := dependency.NewDefaultFactory(true)

View File

@ -42,7 +42,6 @@ func TestTimetickSync(t *testing.T) {
paramtable.Get().Save(Params.RootCoordCfg.DmlChannelNum.Key, "2")
paramtable.Get().Save(Params.CommonCfg.RootCoordDml.Key, "rootcoord-dml")
paramtable.Get().Save(Params.CommonCfg.RootCoordDelta.Key, "rootcoord-delta")
ttSync := newTimeTickSync(ctx, sourceID, factory, nil)
var wg sync.WaitGroup
@ -121,7 +120,6 @@ func TestMultiTimetickSync(t *testing.T) {
paramtable.Get().Save(Params.RootCoordCfg.DmlChannelNum.Key, "1")
paramtable.Get().Save(Params.CommonCfg.RootCoordDml.Key, "rootcoord-dml")
paramtable.Get().Save(Params.CommonCfg.RootCoordDelta.Key, "rootcoord-delta")
ttSync := newTimeTickSync(ctx, UniqueID(0), factory, nil)
var wg sync.WaitGroup
@ -188,8 +186,6 @@ func TestTimetickSyncWithExistChannels(t *testing.T) {
//}
paramtable.Get().Save(Params.CommonCfg.RootCoordDml.Key, "rootcoord-dml")
paramtable.Get().Save(Params.CommonCfg.RootCoordDelta.Key, "rootcoord-delta")
paramtable.Get().Save(Params.RootCoordCfg.DmlChannelNum.Key, "5")
chans := map[UniqueID][]string{}
chans[UniqueID(100)] = []string{"by-dev-rootcoord-dml_4", "by-dev-rootcoord-dml_8"}
@ -239,7 +235,6 @@ func TestTimetickSyncInvalidName(t *testing.T) {
//}
paramtable.Get().Save(Params.CommonCfg.RootCoordDml.Key, "rootcoord-dml")
paramtable.Get().Save(Params.CommonCfg.RootCoordDelta.Key, "rootcoord-delta")
chans := map[UniqueID][]string{}
chans[UniqueID(100)] = []string{"rootcoord-dml4"}
assert.Panics(t, func() {

View File

@ -162,25 +162,12 @@ func (p *ComponentParam) WatchKeyPrefix(keyPrefix string, watcher config.EventHa
type commonConfig struct {
ClusterPrefix ParamItem `refreshable:"false"`
// Deprecated: do not use it anymore
ProxySubName ParamItem `refreshable:"true"`
RootCoordTimeTick ParamItem `refreshable:"true"`
RootCoordStatistics ParamItem `refreshable:"true"`
RootCoordDml ParamItem `refreshable:"false"`
RootCoordDelta ParamItem `refreshable:"false"`
// Deprecated: do not use it anymore
RootCoordSubName ParamItem `refreshable:"true"`
// Deprecated: only used in metrics as ID
QueryCoordSearch ParamItem `refreshable:"true"`
// Deprecated: only used in metrics as ID
QueryCoordSearchResult ParamItem `refreshable:"true"`
QueryCoordTimeTick ParamItem `refreshable:"true"`
QueryNodeSubName ParamItem `refreshable:"false"`
QueryCoordTimeTick ParamItem `refreshable:"true"`
// Deprecated: do not use it anymore
DataCoordStatistic ParamItem `refreshable:"true"`
// Deprecated
DataCoordTimeTick ParamItem `refreshable:"false"`
DataCoordSegmentInfo ParamItem `refreshable:"true"`
@ -251,15 +238,6 @@ func (p *commonConfig) init(base *BaseTable) {
chanNamePrefix := func(prefix string) string {
return strings.Join([]string{p.ClusterPrefix.GetValue(), prefix}, "-")
}
p.ProxySubName = ParamItem{
Key: "msgChannel.subNamePrefix.proxySubNamePrefix",
Version: "2.1.0",
FallbackKeys: []string{"common.subNamePrefix.proxySubNamePrefix"},
PanicIfEmpty: true,
Formatter: chanNamePrefix,
Export: true,
}
p.ProxySubName.Init(base.mgr)
// --- rootcoord ---
p.RootCoordTimeTick = ParamItem{
@ -292,46 +270,6 @@ func (p *commonConfig) init(base *BaseTable) {
}
p.RootCoordDml.Init(base.mgr)
p.RootCoordDelta = ParamItem{
Key: "msgChannel.chanNamePrefix.rootCoordDelta",
Version: "2.1.0",
FallbackKeys: []string{"common.chanNamePrefix.rootCoordDelta"},
PanicIfEmpty: true,
Formatter: chanNamePrefix,
Export: true,
}
p.RootCoordDelta.Init(base.mgr)
p.RootCoordSubName = ParamItem{
Key: "msgChannel.subNamePrefix.rootCoordSubNamePrefix",
Version: "2.1.0",
FallbackKeys: []string{"common.subNamePrefix.rootCoordSubNamePrefix"},
PanicIfEmpty: true,
Formatter: chanNamePrefix,
Export: true,
}
p.RootCoordSubName.Init(base.mgr)
p.QueryCoordSearch = ParamItem{
Key: "msgChannel.chanNamePrefix.search",
Version: "2.1.0",
FallbackKeys: []string{"common.chanNamePrefix.search"},
PanicIfEmpty: true,
Formatter: chanNamePrefix,
Export: true,
}
p.QueryCoordSearch.Init(base.mgr)
p.QueryCoordSearchResult = ParamItem{
Key: "msgChannel.chanNamePrefix.searchResult",
Version: "2.1.0",
FallbackKeys: []string{"common.chanNamePrefix.searchResult"},
PanicIfEmpty: true,
Formatter: chanNamePrefix,
Export: true,
}
p.QueryCoordSearchResult.Init(base.mgr)
p.QueryCoordTimeTick = ParamItem{
Key: "msgChannel.chanNamePrefix.queryTimeTick",
Version: "2.1.0",
@ -342,26 +280,6 @@ func (p *commonConfig) init(base *BaseTable) {
}
p.QueryCoordTimeTick.Init(base.mgr)
p.QueryNodeSubName = ParamItem{
Key: "msgChannel.subNamePrefix.queryNodeSubNamePrefix",
Version: "2.1.0",
FallbackKeys: []string{"common.subNamePrefix.queryNodeSubNamePrefix"},
PanicIfEmpty: true,
Formatter: chanNamePrefix,
Export: true,
}
p.QueryNodeSubName.Init(base.mgr)
p.DataCoordStatistic = ParamItem{
Key: "msgChannel.chanNamePrefix.dataCoordStatistic",
Version: "2.1.0",
FallbackKeys: []string{"common.chanNamePrefix.dataCoordStatistic"},
PanicIfEmpty: true,
Formatter: chanNamePrefix,
Export: true,
}
p.DataCoordStatistic.Init(base.mgr)
p.DataCoordTimeTick = ParamItem{
Key: "msgChannel.chanNamePrefix.dataCoordTimeTick",
Version: "2.1.0",

View File

@ -66,10 +66,6 @@ func TestComponentParam(t *testing.T) {
params.Save(Params.GracefulStopTimeout.Key, "50")
assert.Equal(t, Params.GracefulStopTimeout.GetAsInt64(), int64(50))
// -- proxy --
assert.Equal(t, Params.ProxySubName.GetValue(), "by-dev-proxy")
t.Logf("ProxySubName: %s", Params.ProxySubName.GetValue())
// -- rootcoord --
assert.Equal(t, Params.RootCoordTimeTick.GetValue(), "by-dev-rootcoord-timetick")
t.Logf("rootcoord timetick channel = %s", Params.RootCoordTimeTick.GetValue())
@ -80,26 +76,10 @@ func TestComponentParam(t *testing.T) {
assert.Equal(t, Params.RootCoordDml.GetValue(), "by-dev-rootcoord-dml")
t.Logf("rootcoord dml channel = %s", Params.RootCoordDml.GetValue())
assert.Equal(t, Params.RootCoordDelta.GetValue(), "by-dev-rootcoord-delta")
t.Logf("rootcoord delta channel = %s", Params.RootCoordDelta.GetValue())
assert.Equal(t, Params.RootCoordSubName.GetValue(), "by-dev-rootCoord")
t.Logf("rootcoord subname = %s", Params.RootCoordSubName.GetValue())
// -- querycoord --
assert.Equal(t, Params.QueryCoordSearch.GetValue(), "by-dev-search")
t.Logf("querycoord search channel = %s", Params.QueryCoordSearch.GetValue())
assert.Equal(t, Params.QueryCoordSearchResult.GetValue(), "by-dev-searchResult")
t.Logf("querycoord search result channel = %s", Params.QueryCoordSearchResult.GetValue())
assert.Equal(t, Params.QueryCoordTimeTick.GetValue(), "by-dev-queryTimeTick")
t.Logf("querycoord timetick channel = %s", Params.QueryCoordTimeTick.GetValue())
// -- querynode --
assert.Equal(t, Params.QueryNodeSubName.GetValue(), "by-dev-queryNode")
t.Logf("querynode subname = %s", Params.QueryNodeSubName.GetValue())
// -- datacoord --
assert.Equal(t, Params.DataCoordTimeTick.GetValue(), "by-dev-datacoord-timetick-channel")
t.Logf("datacoord timetick channel = %s", Params.DataCoordTimeTick.GetValue())