Intermittent errors creating a collection
还没有人认领这个 Issue。
评估
调研方向
从 main.rs 中的复现以及 Cargo.toml 中的 qdrant-client 版本开始;将 shard_number 设置为 4,运行 collection 创建/删除序列,然后与设置为 2 的情况进行比较。检查客户端响应以及由此产生的 qdrant_storage/MY_COLLECTION 状态。完成的标准是:解释清楚依赖 shard 的超时和陈旧 collection 行为,并提供经过验证的 fix 或记录完整的复现步骤。
由索引模型根据 Issue 内容生成。
描述
Hi, I am getting intermittent, inconsistent errors creating a collection. Any insight or assistance appreciated. Thank you in advance for your assistance!
Update: The issue seems to go away when I change the shard number from 4 to 2.
Issues
When I first run the below script, when the collection does not exist, I get Error: Error in the response: The operation was cancelled Timeout expired. Despite that, the qdrant_storage/MY_COLLECTION folder exists, and it shows up in the dashboard.
When I run it again, I get
collection exists, deleting...
Error: Error in the response: The operation was cancelled Timeout expired
I have also encountered issues where the client does not think the collection exists (so does not try deleting it), but when it tries to create it, I get errors like
Error in the response: Client specified an invalid argument Wrong input: Can't create collection with name MY_COLLECTION. Collection data already exists at ./storage/collections/MY_COLLECTION
Sometimes, it works fine, but it's unclear what conditions lead to success.
Code
main.rs
use anyhow::{Context, Result};
use qdrant_client::qdrant::{
CreateCollectionBuilder, Datatype, Distance, OptimizersConfigDiffBuilder, VectorParamsBuilder,
};
use qdrant_client::Qdrant;
const QDRANT_CONNECTION_URL: &str = "http://localhost:6334";
#[tokio::main]
async fn main() -> Result<()> {
let client = Qdrant::from_url(QDRANT_CONNECTION_URL)
.build()
.context("Failed to build Qdrant Client")?;
create_collection(&client, "MY_COLLECTION").await?;
Ok(())
}
pub async fn create_collection(client: &Qdrant, name: &str) -> Result<()> {
if client.collection_exists(name).await? {
println!("collection exists, deleting...");
client.delete_collection(name).await?;
}
client
.create_collection(
CreateCollectionBuilder::new(name)
.vectors_config(
VectorParamsBuilder::new(1280, Distance::Cosine)
.datatype(Datatype::Float16)
.on_disk(true),
)
.optimizers_config(OptimizersConfigDiffBuilder::default().indexing_threshold(0))
.shard_number(4),
)
.await?;
Ok(())
}
Cargo.toml
[package]
name = "upload-issue"
version = "0.1.0"
edition = "2021"
[dependencies]
anyhow = "1.0.83"
qdrant-client = "1.11.2"
tokio = { version = "1.37.0", features = ["rt-multi-thread"] }
- 主要语言
- Rust
- 星标
- 425
- 派生
- 89
- 平均合并
- 2 小时 48 分钟
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
qdrant/rust-client 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 55/100
qdrant/rust-client#320 ·
-
upsert_points deep-clones the whole request on every call, not only on retry可能重新可做 @NullSense 于 7 天前认领,目前没有进行中的 PR。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
qdrant/rust-client#316 · 3 条评论 ·
-
Option to set TLS domain name and :authority origin (client behind a tunnel/proxy)可能重新可做 @inamdarmihir 于 37 天前认领,目前没有进行中的 PR。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
qdrant/rust-client#306 · 1 条评论 ·
-
enhancement
难度 5/5 一周以上 新手友好度 38/100
qdrant/rust-client#289 ·
-
难度 3/5 1-2 天 新手友好度 30/100
qdrant/rust-client#272 · 2 个 reaction ·
查看 qdrant/rust-client 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 83/100
roc-lang/basic-webserver#277 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 82/100
samkerrcode/opengent#113 ·
维护者通常 1 天内回复
-
app bug session
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复