mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-13 20:33:49 +00:00
Indexed large data sources in steps so the others get their turn (#1052)
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user