From 25595a39a58d6b82023fc127e836feca7d18ad80 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Thu, 4 Jun 2026 15:53:30 +0200 Subject: [PATCH] Fixed minor warnings for Qdrant edge client implementation (#791) --- .../VectorStore/QdrantEdgeClientImplementation.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/MindWork AI Studio/Tools/Databases/VectorStore/QdrantEdgeClientImplementation.cs b/app/MindWork AI Studio/Tools/Databases/VectorStore/QdrantEdgeClientImplementation.cs index 6e606246..7a5e61b9 100644 --- a/app/MindWork AI Studio/Tools/Databases/VectorStore/QdrantEdgeClientImplementation.cs +++ b/app/MindWork AI Studio/Tools/Databases/VectorStore/QdrantEdgeClientImplementation.cs @@ -17,10 +17,12 @@ public sealed class QdrantEdgeClientImplementation( private const string INSERT_PATH = "/system/qdrant-edge/insert"; private const string DELETE_FILE_PATH = "/system/qdrant-edge/delete-file"; private const string DELETE_STORE_PATH = "/system/qdrant-edge/delete-store"; + + private readonly string path = path; private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(QdrantEdgeClientImplementation).Namespace, nameof(QdrantEdgeClientImplementation)); - public override string CacheKey => $"{this.Name}:{path}:{version}"; + public override string CacheKey => $"{this.Name}:{this.path}:{version}"; public static async Task CreateAsync( RustService rustService, @@ -46,7 +48,9 @@ public sealed class QdrantEdgeClientImplementation( if (!qdrantEdgeInfo.IsAvailable || qdrantEdgeInfo.Status is QdrantEdgeStatus.UNAVAILABLE) { var reason = qdrantEdgeInfo.UnavailableReason ?? "unknown"; + // ReSharper disable DuplicateItemInLoggerTemplate logger.LogWarning("{VectorStoreName} is not available. Starting without {VectorStoreName} vector store. Reason: '{Reason}'.", DATABASE_NAME, DATABASE_NAME, reason); + // ReSharper restore DuplicateItemInLoggerTemplate return CreateNoVectorStoreClient(DATABASE_NAME, qdrantEdgeInfo.UnavailableReason, DatabaseClientStatus.UNAVAILABLE, databaseClientLogger); } @@ -99,11 +103,13 @@ public sealed class QdrantEdgeClientImplementation( return client; } + // ReSharper disable NotAccessedPositionalProperty.Local private sealed record EnsureVectorStoreRequest(string StoreName, int VectorSize); private sealed record InsertEmbeddingRequest(string StoreName, IReadOnlyList Points); private sealed record DeleteEmbeddingByFileRequest(string StoreName, string FilePath); - + private sealed record DeleteVectorStoreRequest(string StoreName); -} + // ReSharper restore NotAccessedPositionalProperty.Local +} \ No newline at end of file