Let rootcoord share proxy.TimeTickInterval ()

Signed-off-by: yudong.cai <yudong.cai@zilliz.com>
pull/14373/head
Cai Yudong 2021-12-27 21:38:45 +08:00 committed by GitHub
parent 660d8c015e
commit 30382d8bf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 14 deletions

View File

@ -63,7 +63,6 @@ rootCoord:
maxPartitionNum: 4096 # Maximum number of partitions in a collection
minSegmentSizeToEnableIndex: 1024 # It's a threshold. When the segment size is less than this value, the segment will not be indexed
timeout: 3600 # time out, 5 seconds
timeTickInterval: 200 # ms, the interval that proxy synchronize the time tick
# Related configuration of proxy, used to validate client requests and reduce the returned results.
proxy:

View File

@ -272,7 +272,7 @@ func (c *Core) checkInit() error {
func (c *Core) startTimeTickLoop() {
defer c.wg.Done()
ticker := time.NewTicker(time.Duration(Params.RootCoordCfg.TimeTickInterval) * time.Millisecond)
ticker := time.NewTicker(Params.ProxyCfg.TimeTickInterval)
for {
select {
case <-c.ctx.Done():

View File

@ -141,7 +141,7 @@ func (t *timetickSync) sendToChannel() {
// give warning every 2 second if not get ttMsg from proxy nodes
if maxCnt%10 == 0 {
log.Warn("proxy idle for long time", zap.Any("proxy list", idleProxyList),
zap.Int64("idle time", int64(Params.RootCoordCfg.TimeTickInterval)*maxCnt))
zap.Any("idle time", Params.ProxyCfg.TimeTickInterval.Milliseconds()*maxCnt))
}
return
}
@ -314,7 +314,7 @@ func (t *timetickSync) startWatch(wg *sync.WaitGroup) {
wg.Wait()
span := tr.ElapseSpan()
// rootcoord send tt msg to all channels every 200ms by default
if span.Milliseconds() > int64(Params.RootCoordCfg.TimeTickInterval) {
if span > Params.ProxyCfg.TimeTickInterval {
log.Warn("rootcoord send tt to all channels too slowly",
zap.Int("chanNum", len(local.chanTs)), zap.Int64("span", span.Milliseconds()))
}

View File

@ -301,8 +301,7 @@ type rootCoordConfig struct {
DefaultIndexName string
MinSegmentSizeToEnableIndex int64
Timeout int
TimeTickInterval int
Timeout int
CreatedTime time.Time
UpdatedTime time.Time
@ -331,7 +330,6 @@ func (p *rootCoordConfig) init(bp *BaseParamTable) {
p.initDefaultIndexName()
p.initTimeout()
p.initTimeTickInterval()
//p.initRoleName()
}
@ -455,10 +453,6 @@ func (p *rootCoordConfig) initTimeout() {
p.Timeout = p.BaseParams.ParseIntWithDefault("rootCoord.timeout", 3600)
}
func (p *rootCoordConfig) initTimeTickInterval() {
p.TimeTickInterval = p.BaseParams.ParseIntWithDefault("rootCoord.timeTickInterval", 200)
}
//func (p *rootCoordConfig) initRoleName() {
// p.RoleName = "rootcoord"
//}

View File

@ -79,9 +79,6 @@ func TestGlobalParamTable(t *testing.T) {
assert.NotZero(t, Params.Timeout)
t.Logf("master timeout = %d", Params.Timeout)
assert.NotZero(t, Params.TimeTickInterval)
t.Logf("master timetickerInterval = %d", Params.TimeTickInterval)
Params.CreatedTime = time.Now()
Params.UpdatedTime = time.Now()
t.Logf("created time: %v", Params.CreatedTime)