mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 04:49:08 +08:00
Add config for disable BF load (#22996)
Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>
This commit is contained in:
parent
fc1545c4ee
commit
d0510210df
@ -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)
|
||||
}
|
||||
|
||||
// /////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user