fix: Use k locations only for basic BF test location (#35380)

Related to #35379

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/35385/head
congqixia 2024-08-09 07:52:22 +08:00 committed by GitHub
parent 143502e708
commit c0ee25afd8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -228,7 +228,7 @@ func (lc *BatchLocationsCache) Locations(k uint, bfType bloomfilter.BFType) [][]
})
}
return lc.basicLocations
return lo.Map(lc.basicLocations, func(locations []uint64, _ int) []uint64 { return locations[:k] })
case bloomfilter.BlockedBF:
// for block bf, we only need cache the hash result, which is a uint and only compute once for any k value
if len(lc.blockLocations) != len(lc.pks) {