Legacy upload with `--fbin` panics when more points are requested than the file holds
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- performance
Hướng nghiên cứu
Bắt đầu từ đường upload điều khiển bằng flag, nơi gọi reader.read_vector(idx) trên reader --fbin, và từ nguồn YAML from_start, nơi đã áp dụng idx % num_vectors. Kiểm tra cách idx được tạo từ --offset và --max-id. Hoàn thành khi một tệp fbin 1000 vector với giá trị mặc định của --num-vectors được upload mà không panic, và các chỉ số được wrap theo cùng cách như đường YAML.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
The flag-driven upload reads the vector for point idx straight from the --fbin file with reader.read_vector(idx). Nothing checks idx against the number of vectors in the file. The value of idx is --offset plus the point's position, or a random value in [--offset, --max-id) when --max-id is set.
So bfb --fbin vectors.fbin with the default --num-vectors 100000 and a file that holds fewer vectors panics partway through the upload:
range end index ... out of range for slice of length ...
The same happens with a large --offset, or with a --max-id larger than the file.
The YAML-config path does not have this problem. source: {type: file, strategy: from_start} wraps the index with idx % num_vectors, and query generation does the same.
Steps to reproduce
- Create an fbin file with 1000 vectors of dimension 128.
- Run
bfb --fbin vectors.fbin --dim 128against a local Qdrant.--num-vectorsdefaults to 100000.
Expected behavior
The upload cycles through the file, as the YAML from_start strategy does.
Actual behavior
The upload panics with an out-of-range slice index once idx reaches the number of vectors in the file.
- Ngôn ngữ chính
- Rust
- Star
- 22
- Fork
- 5
- Merge trung bình
- 2 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Không 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 qdrant/bfb
-
Release Docker image for ARM64Đang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Issue tương tự
-
Mobile release verification reports missing build inputs with a custom Cargo target directoryĐang mởbug good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
getsotto/sotto-authenticator#139 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
registrystack/registry-stack#2924 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
foundry-rs/starknet-foundry#4733 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100