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

Aperta Adatta ai principianti
#191 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@RaphaelFakhri ci sta già lavorando.

Dal 3/11/2026.

  • #192 di @RaphaelFakhri — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
performance

Direzione di ricerca

Parti dal percorso di upload guidato dai flag che chiama reader.read_vector(idx) sul reader --fbin, e dalla sorgente YAML from_start, che applica già idx % num_vectors. Verifica come viene costruito idx a partire da --offset e --max-id. È completato quando un file fbin da 1000 vettori con il valore predefinito di --num-vectors viene caricato senza panic, con gli indici avvolti nello stesso modo del percorso YAML.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
22
Fork
5
Merge medio
2g 2h
PR unite (30g)
1

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di qdrant/bfb

Tutte le issue di qdrant/bfb

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.