未验证 提交 d0510210 编写于 作者: X Xiaofan 提交者: GitHub

Add config for disable BF load (#22996)

Signed-off-by: Nxiaofan-luan <xiaofan.luan@zilliz.com>
上级 fc1545c4
......@@ -614,6 +614,12 @@ func (s *Segment) InitCurrentStat() {
func (s *Segment) isPKExist(pk primaryKey) bool {
s.statLock.Lock()
defer s.statLock.Unlock()
if Params.DataNodeCfg.SkipBFStatsLoad.GetAsBool() {
log.Warn("processing delete while skip load BF, may affect performance", zap.Any("pk", pk), zap.Int64("segmentID", s.segmentID))
return true
}
if s.currentStat != nil && s.currentStat.PkExist(pk) {
return true
}
......
......@@ -642,6 +642,11 @@ func (loader *segmentLoader) loadSegmentBloomFilter(ctx context.Context, segment
return nil
}
if Params.DataNodeCfg.SkipBFStatsLoad.GetAsBool() {
log.Info("skip load BF with config set ", zap.Int64("segmentID", segment.segmentID))
return nil
}
startTs := time.Now()
values, err := loader.cm.MultiRead(ctx, binlogPaths)
if err != nil {
......
......@@ -2036,6 +2036,9 @@ type dataNodeConfig struct {
// DataNode send timetick interval per collection
DataNodeTimeTickInterval ParamItem `refreshable:"false"`
// Skip BF
SkipBFStatsLoad ParamItem `refreshable:"true"`
}
func (p *dataNodeConfig) init(base *BaseTable) {
......@@ -2150,6 +2153,14 @@ func (p *dataNodeConfig) init(base *BaseTable) {
DefaultValue: "500",
}
p.DataNodeTimeTickInterval.Init(base.mgr)
p.SkipBFStatsLoad = ParamItem{
Key: "dataNode.skip.BFStats.Load",
Version: "2.2.5",
PanicIfEmpty: false,
DefaultValue: "false",
}
p.SkipBFStatsLoad.Init(base.mgr)
}
// /////////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册