qdrant-js
qdrant-js copied to clipboard
gRPC connection hangs forever
I was using QdrantClient
with gRPC, at the end of my script the node.js process hangs forever.
Here there is small script to reproduce it (also as a gist).
const { QdrantClient, Distance } = require("@qdrant/js-client-grpc");
async function main(url, size, collectionName) {
const client = new QdrantClient({ url });
const createResponse = await client.api("collections").create({
collectionName,
vectorsConfig: {
config: {
case: "params",
value: { size: BigInt(size), distance: Distance.Cosine },
},
},
});
console.log("collection creation response = ", createResponse.result);
const deleteResponse = await client.api("collections").delete({
collectionName,
});
console.log("collection deletion response = ", deleteResponse.result);
return "done";
}
main("http://127.0.0.1:6334", 10, "sentences")
.then((value) => console.log(value))
.catch((error) => console.error(error));
This happens in the rest client as well if you try to create a collection which already exists. Nodejs exits - even if you put your statement in a try / catch. For now I check if the collection already exists before trying to create it.
If this issue is up for grabs , then I would like to work on it !