Concurrent index: reverse-edge lists grow under update churn until consolidation
Maintainer thường phản hồi trong vòng 5 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
Hướng nghiên cứu
Read include/svs/concurrent/reverse_edges.h and include/svs/concurrent/graph.h, especially replace_node_locked and the update_entries path, then inspect the C API memory accounting in bindings/c/src/svs_c.cpp. Reproduce the reported single-threaded update churn and track reverse-edge memory; done means reverse-edge storage stays bounded under repeated slot reuse without breaking concurrent writers or edge repair.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
With SVS_SYNC_KIND_FINE_GRAIN, the concurrent index's reverse-edge index
(ReverseEdges, include/svs/concurrent/reverse_edges.h) only ever gains
entries during inserts and updates. Stale entries are pruned only by
consolidation. A caller that reuses deleted slots with
svs_index_dynamic_update_points + svs_index_dynamic_replace_id (#467, #468)
rarely needs to consolidate, so these lists keep growing. The growth shows in
svs_index_get_memory_usage and in graph_bytes of
svs_index_get_memory_breakdown, because the C API adds reverse_edges_bytes
to graph_bytes (bindings/c/src/svs_c.cpp:678).
Where it comes from
The code below is on main (added in #369) and unchanged by #467 or #468;
line numbers are at 9330e49, the head of #468.
replace_node_locked(include/svs/concurrent/graph.h, around line 503)
records every new out-edge and, for every dropped out-edge, records the
reverse pairing. It never removes an entry. The exact variant is commented
out ("[Exact list] ... reverse_edges list would be exact for single
thread. Need investigation for concurent case.").ReverseEdgesstores each list as astd::vector, so capacity is never
returned even when consolidation removes entries.
Measurement
Single-threaded, through the C API. L2, FLOAT32, dimension 8,
graph_max_degree 64, construction window 128, 500 live vectors. Each round
deletes 100 vectors, then inserts 100 new ones into the deleted slots
(update_points on the deleted id, then replace_id to the new id). No
consolidation runs.
| Inserts | Memory growth since the initial fill |
|---|---|
| 0 | 0 (the index uses 226,598 bytes) |
| 5,000 | 252,580 |
| 20,000 | 260,004 |
| 40,000 | 265,124 |
data_bytes stays flat, so every slot is reused. All of the growth is in
graph_bytes, about 130 extra entries per node, roughly twice
graph_max_degree. After that it keeps rising slowly, by about 1.6 KB per
5,000 inserts.
Request
Could the reverse-edge index stay bounded without a full consolidation?
For example:
- remove the reverse entry when an edge is dropped (the commented-out exact
variant), if it can be made safe for concurrent writers; or - prune and
shrink_to_fita node's list whenupdate_entriesrewrites that
node, since it already holds the node's lock and repairs its edges.
Without one of these, an index whose inserts reuse deleted slots grows to
about twice its graph size under steady churn, even though it never adds a
slot.
- Ngôn ngữ chính
- C++
- Star
- 241
- Fork
- 48
- Merge trung bình
- 4 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của intel/ScalableVectorSearch
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
intel/ScalableVectorSearch#356 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Add CI test for C API on ARMĐang mởenhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 32/100
intel/ScalableVectorSearch#460 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
intel/ScalableVectorSearch#438 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
CI: tier the test matrix into PR / main / nightly to cut Actions minutesCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 32/100
intel/ScalableVectorSearch#432 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
intel/ScalableVectorSearch#427 ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của intel/ScalableVectorSearch
Issue tương tự
-
runtime: lf_f128_mod is documented as fmodq (truncating) but implements floor-based modulo; unusedĐang mởinternal correctness low priority rt_lib
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 87/100
-
PriorityNotificationQueue::wakeUpAll() loses the wake-up for a thread that is not waiting yetCó thể đã có người làm @matejk đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
pocoproject/poco#5674 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug docs GUI
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
sonic-pi-net/sonic-pi#3609 ·
-
Unreachable code warningĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
SanderMertens/flecs#2395 ·
Maintainer thường phản hồi trong vòng 1 ngày