Legacy upload with `--fbin` panics when more points are requested than the file holds
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
- 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.
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di qdrant/bfb
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
foundry-rs/starknet-foundry#4733 ·
I maintainer di solito rispondono entro 4 giorni
-
autofix:working
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
libracoder/kiri#1138 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno