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

Open Beginner friendly
#191 0 comments 0 reactions 0 assignees View on GitHub

@RaphaelFakhri is already working on this.

Since Nov 3, 2026.

  • #192 by @RaphaelFakhri — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
performance

Research direction

Start from the flag-driven upload path that calls reader.read_vector(idx) on the --fbin reader, and from the YAML from_start source that already applies idx % num_vectors. Check how idx is built from --offset and --max-id. Done when a 1000-vector fbin file with the default --num-vectors uploads without panicking, with indices wrapped the same way as the YAML path.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Rust
Stars
22
Forks
5
Avg merge
2d 2h
Merged PRs (30d)
1

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from qdrant/bfb

All issues in qdrant/bfb

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.