Skip to content

Commit

Permalink
mark bm25 sparse field as has row data to skip load row data
Browse files Browse the repository at this point in the history
Signed-off-by: aoiasd <[email protected]>
  • Loading branch information
aoiasd committed Jan 16, 2025
1 parent bca2a62 commit dc1acb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion internal/querynodev2/segments/segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,11 @@ func (s *LocalSegment) innerLoadIndex(ctx context.Context,
return err
}
updateIndexInfoSpan := tr.RecordSpan()
if !typeutil.IsVectorType(fieldType) || s.HasRawData(indexInfo.GetFieldID()) {
// Skip warnup chunk cache when
// . scalar data
// . index has row data
// . vector was function output
if !typeutil.IsVectorType(fieldType) || s.HasRawData(indexInfo.GetFieldID()) || fieldSchema.IsFunctionOutput {
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion internal/querynodev2/segments/segment_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -1509,7 +1509,7 @@ func getResourceUsageEstimateOfSegment(schema *schemapb.CollectionSchema, loadIn
if !estimateResult.HasRawData && !isVectorType {
shouldCalculateDataSize = true
}
if !estimateResult.HasRawData && isVectorType {
if !estimateResult.HasRawData && isVectorType && !fieldSchema.IsFunctionOutput {
mmapChunkCache := paramtable.Get().QueryNodeCfg.MmapChunkCache.GetAsBool()
if mmapChunkCache {
segmentDiskSize += binlogSize
Expand Down

0 comments on commit dc1acb3

Please sign in to comment.