diff --git a/internal/querynode/segment.go b/internal/querynode/segment.go index f88be0dff9..a546e64b06 100644 --- a/internal/querynode/segment.go +++ b/internal/querynode/segment.go @@ -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 } diff --git a/internal/querynode/segment_loader.go b/internal/querynode/segment_loader.go index 0cd90429d8..23c575d483 100644 --- a/internal/querynode/segment_loader.go +++ b/internal/querynode/segment_loader.go @@ -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 { diff --git a/internal/util/paramtable/component_param.go b/internal/util/paramtable/component_param.go index 6a68706867..86187933e0 100644 --- a/internal/util/paramtable/component_param.go +++ b/internal/util/paramtable/component_param.go @@ -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) } // /////////////////////////////////////////////////////////////////////////////