Skip to content

Commit b6cd466

Browse files
Jordan MaplesCopilot
andcommitted
Add bf-tree direct-streaming capacity regression guardrail
The bf-tree direct (non-Managed) streaming path uses absolute runbook tag IDs as provider slot IDs, so the provider must be sized to the dataset ID space rather than the runbook's max concurrent active-point count. The existing test_data runbook does not exercise this because its max active count equals its max tag. Add a minimal, search-free runbook whose max tag (191) exceeds its max active-point count (128) via a delete-then-insert sequence, plus a bftree streaming config and an integration test. With correct sizing the test passes; a provider mis-sized to max_pts fails with "Vector id is out of boundary in the dataset". Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 50c8c57 commit b6cd466

3 files changed

Lines changed: 105 additions & 0 deletions

File tree

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"search_directories": [
3+
"test_data/disk_index_search"
4+
],
5+
"jobs": [
6+
{
7+
"type": "graph-index-stream-bftree",
8+
"content": {
9+
"build": {
10+
"data_type": "float32",
11+
"data": "disk_index_siftsmall_learn_256pts_data.fbin",
12+
"distance": "squared_l2",
13+
"max_degree": 32,
14+
"l_build": 50,
15+
"start_point_strategy": "medoid",
16+
"alpha": 1.2,
17+
"backedge_ratio": 1.0,
18+
"num_threads": 1
19+
},
20+
"search": {
21+
"queries": "disk_index_sample_query_10pts.fbin",
22+
"reps": 1,
23+
"num_threads": 1,
24+
"search_l": 40,
25+
"search_n": 10,
26+
"recall_k": 10
27+
},
28+
"runbook_params": {
29+
"runbook_path": "stream_capacity_runbook.yaml",
30+
"dataset_name": "sift-small-256",
31+
"gt_directory": "example_runbook_gt",
32+
"ip_delete_method": {
33+
"method": "one_hop"
34+
},
35+
"ip_delete_num_to_replace": 3
36+
},
37+
"quantization": {
38+
"kind": "none"
39+
},
40+
"vector_store_config": {
41+
"cb_size_byte": 67108864,
42+
"leaf_page_size": 4096,
43+
"cb_max_record_size": null,
44+
"cb_min_record_size": null,
45+
"read_promotion_rate": null,
46+
"scan_promotion_rate": null,
47+
"cb_copy_on_access_ratio": null,
48+
"read_record_cache": null,
49+
"cache_only": null,
50+
"use_snapshot": false
51+
},
52+
"neighbor_store_config": {
53+
"cb_size_byte": 67108864,
54+
"leaf_page_size": 4096,
55+
"cb_max_record_size": null,
56+
"cb_min_record_size": null,
57+
"read_promotion_rate": null,
58+
"scan_promotion_rate": null,
59+
"cb_copy_on_access_ratio": null,
60+
"read_record_cache": null,
61+
"cache_only": null,
62+
"use_snapshot": false
63+
}
64+
}
65+
}
66+
]
67+
}

diskann-benchmark/src/main.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,20 @@ mod tests {
369369
run_integration_test(raw);
370370
}
371371

372+
// Guardrail: the bf-tree direct (non-Managed) streaming path uses absolute
373+
// runbook tag IDs as provider slot IDs, so the provider must be sized to the
374+
// dataset ID space rather than the runbook's max concurrent active-point
375+
// count. This runbook drives the max tag above the max active count, which
376+
// fails with "Vector id is out of boundary in the dataset" if the provider
377+
// is mis-sized to `max_pts`.
378+
#[test]
379+
#[cfg(feature = "bftree")]
380+
fn graph_index_bftree_stream_capacity_integration() {
381+
let raw =
382+
value_from_file(&example_directory().join("graph-index-bftree-stream-capacity.json"));
383+
run_integration_test(raw);
384+
}
385+
372386
#[test]
373387
#[cfg(feature = "bftree")]
374388
fn graph_index_bftree_save_load_roundtrip() {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Regression guardrail for bf-tree direct (non-Managed) streaming.
2+
#
3+
# The direct path uses absolute runbook tag IDs as provider slot IDs, so the
4+
# provider must be sized to the dataset ID space, not the runbook's maximum
5+
# concurrent active-point count. This runbook deliberately drives the maximum
6+
# tag (191) above the maximum number of concurrently-active points (128) via a
7+
# delete-then-insert sequence, so a provider sized to `max_pts` would fail with
8+
# "Vector id is out of boundary in the dataset" on stage 3.
9+
#
10+
# There are no search stages, so no groundtruth files are required.
11+
sift-small-256:
12+
max_pts: 128
13+
1:
14+
operation: "insert"
15+
start: 0
16+
end: 128
17+
2:
18+
operation: "delete"
19+
start: 0
20+
end: 64
21+
3:
22+
operation: "insert"
23+
start: 128
24+
end: 192

0 commit comments

Comments
 (0)