Make Datacoord TT to be configurable (#22956)

Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>
pull/22996/head
Xiaofan 2023-03-24 22:24:04 +08:00 committed by GitHub
parent da58ba6a49
commit 5a914aedf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -74,13 +74,13 @@ func (mt *mergedTimeTickerSender) bufferTs(ts Timestamp, segmentIDs []int64) {
func (mt *mergedTimeTickerSender) tick() {
defer mt.wg.Done()
// this duration might be configuable in the future
t := time.NewTicker(time.Millisecond * 100) // 100 millisecond, 1/2 of rootcoord timetick duration
t := time.NewTicker(Params.DataNodeCfg.DataNodeTimeTickInterval.GetAsDuration(time.Millisecond)) // 500 millisecond
defer t.Stop()
for {
select {
case <-t.C:
mt.cond.L.Lock()
mt.cond.Signal() // allow worker to check every 0.1s
mt.cond.Signal()
mt.cond.L.Unlock()
case <-mt.closeCh:
return

View File

@ -2015,6 +2015,9 @@ type dataNodeConfig struct {
MemoryForceSyncEnable ParamItem `refreshable:"true"`
MemoryForceSyncSegmentNum ParamItem `refreshable:"true"`
MemoryWatermark ParamItem `refreshable:"true"`
// DataNode send timetick interval per collection
DataNodeTimeTickInterval ParamItem `refreshable:"false"`
}
func (p *dataNodeConfig) init(base *BaseTable) {
@ -2122,6 +2125,13 @@ func (p *dataNodeConfig) init(base *BaseTable) {
}
p.IOConcurrency.Init(base.mgr)
p.DataNodeTimeTickInterval = ParamItem{
Key: "datanode.timetick.interval",
Version: "2.2.5",
PanicIfEmpty: false,
DefaultValue: "500",
}
p.DataNodeTimeTickInterval.Init(base.mgr)
}
// /////////////////////////////////////////////////////////////////////////////