Indexed large data sources in steps so the others get their turn (#1052)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-11 20:48:40 +02:00
1 parent fe4a64f382
commit a3c6b29313
26 files changed
+1932 -334

No files matched your search

@@ -32,7 +32,7 @@ public sealed partial class DataSourceEmbeddingService
dataSource.Id);
var activeRun = this.CancelActiveDataSourceRun(dataSource);
this.ClearQueuedDataSourceState(dataSourceId);
this.runQueue.Clear(dataSourceId);
if (activeRun is not null)
await activeRun.Completion.Task;
@@ -137,6 +137,8 @@ public sealed partial class DataSourceEmbeddingService
IndexStoreClient? indexStore,
CancellationToken token)
{
// What failed while building the index which is thrown away now says nothing about the next one:
this.passes.TryRemove(dataSourceId, out _);
await this.DeleteCollectionAsync(DataSourceEmbeddingNames.GetCollectionName(dataSourceId), vectorStore, token);
indexStore ??= await databaseClientProvider.GetIndexStoreAsync(token);