Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,13 @@ private async Task<IReadOnlyList<object>> GetPreExistingChunksIdsAsync(Ingestion
}

// Each Vector Store has a different max top count limit, so we use low value and loop.
const int MaxTopCount = 1_000;
// Use smaller batch size in debug to be able to test the looping logic without needing to insert a lot of records.
const int MaxTopCount =
#if RELEASE
1_000;
#else
10;
#endif

List<object> keys = [];
int insertedCount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,9 @@ public async Task IncrementalIngestion_WithManyRecords_DeletesAllPreExistingChun

IngestionDocument document = new(documentId);

// Create more chunks than the MaxTopCount (1000) to test pagination
// We create 2500 chunks to ensure multiple batches
// Create enough chunks to exercise the incremental ingestion delete-all behavior in DEBUG builds
List<IngestionChunk<string>> chunks = [];
for (int i = 0; i < 2500; i++)
for (int i = 0; i < 50; i++)
Comment thread
adamsitnik marked this conversation as resolved.
{
chunks.Add(new($"chunk {i}", document));
}
Expand Down
Loading