Legacy upload with `--fbin` panics when more points are requested than the file holds
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
- 領域
- performance
調査の方向性
フラグ駆動のアップロード経路から始めてください。この経路は--fbinリーダーに対してreader.read_vector(idx)を呼び出します。また、すでにidx % num_vectorsを適用しているYAMLのfrom_startソースも確認してください。idxが--offsetと--max-idからどのように構築されているかを確認してください。1000ベクトルのfbinファイルを、デフォルトの--num-vectorsでパニックせずにアップロードでき、インデックスがYAMLの経路と同じ方法でラップされていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 22
- フォーク
- 5
- 平均マージ
- 2日 2時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
qdrant/bfb のほかの issue
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
foundry-rs/starknet-foundry#4733 ·
メンテナーはふだん 4 日以内に返信
-
autofix:working
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
libracoder/kiri#1138 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信