Legacy upload with `--fbin` panics when more points are requested than the file holds

Đang mở Phù hợp với người mới
#191 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

@RaphaelFakhri đang làm issue này rồi.

Từ ngày 3/11/2026.

  • #192 của @RaphaelFakhri — đang mở

Đá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
  1. Create an fbin file with 1000 vectors of dimension 128.
  2. Run bfb --fbin vectors.fbin --dim 128 against a local Qdrant. --num-vectors defaults 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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của qdrant/bfb

Tất cả issue của qdrant/bfb

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.