mirror of https://github.com/milvus-io/milvus.git
Reduce scheduler duration of index task from 1s to 500ms (#21893)
Signed-off-by: cai.zhang <cai.zhang@zilliz.com>pull/21941/head
parent
4fa8b90141
commit
85dd8912eb
|
@ -253,6 +253,9 @@ indexCoord:
|
||||||
gc:
|
gc:
|
||||||
interval: 600 # gc interval in seconds
|
interval: 600 # gc interval in seconds
|
||||||
|
|
||||||
|
scheduler:
|
||||||
|
interval: 1000 # scheduler interval in Millisecond
|
||||||
|
|
||||||
indexNode:
|
indexNode:
|
||||||
port: 21121
|
port: 21121
|
||||||
enableDisk: true # enable index node build disk vector index
|
enableDisk: true # enable index node build disk vector index
|
||||||
|
|
|
@ -59,7 +59,7 @@ func newIndexBuilder(ctx context.Context, ic *IndexCoord, metaTable *metaTable,
|
||||||
ic: ic,
|
ic: ic,
|
||||||
tasks: make(map[int64]indexTaskState),
|
tasks: make(map[int64]indexTaskState),
|
||||||
notifyChan: make(chan struct{}, 1),
|
notifyChan: make(chan struct{}, 1),
|
||||||
scheduleDuration: time.Second,
|
scheduleDuration: Params.IndexCoordCfg.SchedulerInterval,
|
||||||
}
|
}
|
||||||
ib.reloadFromKV(aliveNodes)
|
ib.reloadFromKV(aliveNodes)
|
||||||
return ib
|
return ib
|
||||||
|
|
|
@ -1621,7 +1621,8 @@ type indexCoordConfig struct {
|
||||||
|
|
||||||
MinSegmentNumRowsToEnableIndex int64
|
MinSegmentNumRowsToEnableIndex int64
|
||||||
|
|
||||||
GCInterval time.Duration
|
SchedulerInterval time.Duration
|
||||||
|
GCInterval time.Duration
|
||||||
|
|
||||||
CreatedTime time.Time
|
CreatedTime time.Time
|
||||||
UpdatedTime time.Time
|
UpdatedTime time.Time
|
||||||
|
@ -1633,6 +1634,7 @@ func (p *indexCoordConfig) init(base *BaseTable) {
|
||||||
p.Base = base
|
p.Base = base
|
||||||
|
|
||||||
p.initGCInterval()
|
p.initGCInterval()
|
||||||
|
p.initSchedulerInterval()
|
||||||
p.initMinSegmentNumRowsToEnableIndex()
|
p.initMinSegmentNumRowsToEnableIndex()
|
||||||
p.initBindIndexNodeMode()
|
p.initBindIndexNodeMode()
|
||||||
p.initIndexNodeAddress()
|
p.initIndexNodeAddress()
|
||||||
|
@ -1650,6 +1652,10 @@ func (p *indexCoordConfig) initGCInterval() {
|
||||||
p.GCInterval = time.Duration(p.Base.ParseInt64WithDefault("indexCoord.gc.interval", 60*10)) * time.Second
|
p.GCInterval = time.Duration(p.Base.ParseInt64WithDefault("indexCoord.gc.interval", 60*10)) * time.Second
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *indexCoordConfig) initSchedulerInterval() {
|
||||||
|
p.SchedulerInterval = time.Duration(p.Base.ParseInt64WithDefault("indexCoord.scheduler.interval", 1000)) * time.Millisecond
|
||||||
|
}
|
||||||
|
|
||||||
func (p *indexCoordConfig) initBindIndexNodeMode() {
|
func (p *indexCoordConfig) initBindIndexNodeMode() {
|
||||||
p.BindIndexNodeMode = p.Base.ParseBool("indexCoord.bindIndexNodeMode.enable", false)
|
p.BindIndexNodeMode = p.Base.ParseBool("indexCoord.bindIndexNodeMode.enable", false)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue