milvus/internal/querynodev2/segments
wei liu c6a1c49e02
enhance: Use Blocked Bloom Filter instead of basic bloom fitler impl. (#33405)
issue: #32995
To speed up the construction and querying of Bloom filters, we chose a
blocked Bloom filter instead of a basic Bloom filter implementation.

WARN: This PR is compatible with old version bf impl, but if fall back
to old milvus version, it may causes bloom filter deserialize failed.

In single Bloom filter test cases with a capacity of 1,000,000 and a
false positive rate (FPR) of 0.001, the blocked Bloom filter is 5 times
faster than the basic Bloom filter in both querying and construction, at
the cost of a 30% increase in memory usage.

- Block BF construct time	{"time": "54.128131ms"}
- Block BF size	                {"size": 3021578}
- Block BF Test cost	        {"time": "55.407352ms"}
- Basic BF construct time	{"time": "210.262183ms"}
- Basic BF size	                {"size": 2396308}
- Basic BF Test cost	        {"time": "192.596229ms"}

In multi Bloom filter test cases with a capacity of 100,000, an FPR of
0.001, and 100 Bloom filters, we reuse the primary key locations for all
Bloom filters to avoid repeated hash computations. As a result, the
blocked Bloom filter is also 5 times faster than the basic Bloom filter
in querying.

- Block BF TestLocation cost    {"time": "529.97183ms"}
- Basic BF TestLocation cost	{"time": "3.197430181s"}

---------

Signed-off-by: Wei Liu <wei.liu@zilliz.com>
2024-05-31 17:49:45 +08:00
..
metricsutil enhance: add more metrics for cache and search (#31777) 2024-04-10 10:55:17 +08:00
state fix: use stateful lock to avoid load and release on LocalSegment concurrently (#31606) 2024-04-08 17:09:16 +08:00
OWNERS Fix offline set always nil (#23340) 2023-04-11 14:42:30 +08:00
cgo_util.go feat: LRU cache implementation (#32567) 2024-05-06 20:29:30 +08:00
collection.go fix: Unify querynode metrics cleanup in collection release (#32805) 2024-05-07 15:41:29 +08:00
count_reducer.go enhance: retrieve output fields after local reduce (#32346) 2024-04-25 09:49:26 +08:00
count_reducer_test.go enhance: retrieve output fields after local reduce (#32346) 2024-04-25 09:49:26 +08:00
default_limit_reducer.go fix: two-phase retrieval on lru-segment (#32945) 2024-05-15 17:53:34 +08:00
index_attr_cache.go enhance: Add memory size for binlog (#33025) 2024-05-15 12:59:34 +08:00
index_attr_cache_test.go fix: predict inverted index resource usage more reasonably (#31615) 2024-03-27 19:33:09 +08:00
load_field_data_info.go fix: Use correct pools for all CGO methods in segments pkg (#30274) 2024-01-26 10:09:00 +08:00
load_index_info.go feat: support inverted index for array (#33452) 2024-05-31 09:47:47 +08:00
manager.go fix: fix partition loaded num metric (#33316) 2024-05-24 15:31:42 +08:00
manager_test.go enhance: Add `metautil.Channel` to convert string compare to int (#32749) 2024-05-07 19:13:35 +08:00
mock_collection_manager.go fix: Remove `QueryNodeEntitiesSize` after segment/collection released (#31290) 2024-03-15 15:43:04 +08:00
mock_data.go enhance: unify data generation test APIs (#32955) 2024-05-14 14:33:33 +08:00
mock_loader.go feat: LRU cache implementation (#32567) 2024-05-06 20:29:30 +08:00
mock_segment.go enhance: Use Blocked Bloom Filter instead of basic bloom fitler impl. (#33405) 2024-05-31 17:49:45 +08:00
mock_segment_manager.go feat: LRU cache implementation (#32567) 2024-05-06 20:29:30 +08:00
plan.go enhance: retrieve output fields after local reduce (#32346) 2024-04-25 09:49:26 +08:00
plan_test.go enhance: transfer resource group and dbname to querynode when load (#30936) 2024-03-21 11:59:12 +08:00
pool.go enhance: refine logs of cgo pool (#33373) 2024-05-27 19:06:11 +08:00
pool_test.go fix: use seperate warmup pool and disable warmup by default (#33348) 2024-05-27 01:25:40 +08:00
reduce.go enhance: add more trace for search & query (#32734) 2024-05-07 13:03:29 +08:00
reduce_test.go enhance: mmap load raw data if scalar index does not have raw data (#33175) 2024-05-21 11:53:39 +08:00
reducer.go fix: two-phase retrieval on lru-segment (#32945) 2024-05-15 17:53:34 +08:00
reducer_test.go fix: two-phase retrieval on lru-segment (#32945) 2024-05-15 17:53:34 +08:00
result.go fix: query iterator lack results(#33137) (#33422) 2024-05-30 17:51:44 +08:00
result_sorter.go Fix bug of missing JSON type when sorting retrieve results (#25412) (#25455) 2023-07-10 20:02:28 +08:00
result_test.go fix: query iterator lack results(#33137) (#33422) 2024-05-30 17:51:44 +08:00
retrieve.go fix: two-phase retrieval on lru-segment (#32945) 2024-05-15 17:53:34 +08:00
retrieve_test.go enhance: mmap load raw data if scalar index does not have raw data (#33175) 2024-05-21 11:53:39 +08:00
search.go fix: add request resource timeout for lazy load, refactor context usage in cache (#32709) 2024-05-07 16:33:30 +08:00
search_test.go enhance: mmap load raw data if scalar index does not have raw data (#33175) 2024-05-21 11:53:39 +08:00
segment.go enhance: Use Blocked Bloom Filter instead of basic bloom fitler impl. (#33405) 2024-05-31 17:49:45 +08:00
segment_do.go fix: two-phase retrieval on lru-segment (#32945) 2024-05-15 17:53:34 +08:00
segment_interface.go enhance: Use Blocked Bloom Filter instead of basic bloom fitler impl. (#33405) 2024-05-31 17:49:45 +08:00
segment_l0.go enhance: Add `metautil.Channel` to convert string compare to int (#32749) 2024-05-07 19:13:35 +08:00
segment_loader.go enhance: mmap load raw data if scalar index does not have raw data (#33175) 2024-05-21 11:53:39 +08:00
segment_loader_test.go enhance: Use Blocked Bloom Filter instead of basic bloom fitler impl. (#33405) 2024-05-31 17:49:45 +08:00
segment_test.go enhance: Use Blocked Bloom Filter instead of basic bloom fitler impl. (#33405) 2024-05-31 17:49:45 +08:00
statistics.go Protect segment from being released while query/search (#26322) 2023-08-16 18:38:17 +08:00
trace.go fix: Add Wrapper and Keepalive for CTraceContext ids (#32746) 2024-05-07 10:05:35 +08:00
utils.go enhance: use different value to get related data size according to segment type (#33017) 2024-05-14 14:59:33 +08:00
utils_test.go enhance: use different value to get related data size according to segment type (#33017) 2024-05-14 14:59:33 +08:00
validate.go Format the code (#27275) 2023-09-21 09:45:27 +08:00