Skip to content

Fix bug with array size mismatch - #13

Merged
AntyaDev merged 1 commit into
devfrom
12-fix-bug-with-array-size-mismatch-when-db-row-count-was-less-than-batch-size
Mar 6, 2026
Merged

Fix bug with array size mismatch#13
AntyaDev merged 1 commit into
devfrom
12-fix-bug-with-array-size-mismatch-when-db-row-count-was-less-than-batch-size

Conversation

@OleksPal

@OleksPal OleksPal commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@OleksPal OleksPal changed the title Fix bug with array size mismatch when db row count was less than batc… Fix bug with array size mismatch Mar 6, 2026
@OleksPal
OleksPal force-pushed the 12-fix-bug-with-array-size-mismatch-when-db-row-count-was-less-than-batch-size branch from f8d0974 to c3c66fc Compare March 6, 2026 08:25
Comment thread src/NBomber.LargeData/DataFeed.cs Outdated
}

// Resize to actual items read
if (itemsRead < count)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remodel with Array pool

@OleksPal
OleksPal force-pushed the 12-fix-bug-with-array-size-mismatch-when-db-row-count-was-less-than-batch-size branch from c3c66fc to 4b9b609 Compare March 6, 2026 09:58
Comment thread src/NBomber.LargeData/DataFeed.cs Outdated
// If dataset is smaller than requested count, load all items and repeat them
if (DataCount < count)
{
var itemsRead = QueryItems(connection, pooledArray, 1, (int)DataCount);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split this logic in 2 smaller methods. 1 for normal case and one for case when batch is > than db records

@OleksPal
OleksPal force-pushed the 12-fix-bug-with-array-size-mismatch-when-db-row-count-was-less-than-batch-size branch from 4b9b609 to 158c5c2 Compare March 6, 2026 10:34
@AntyaDev
AntyaDev merged commit 8d429bc into dev Mar 6, 2026
1 check failed
@AntyaDev
AntyaDev deleted the 12-fix-bug-with-array-size-mismatch-when-db-row-count-was-less-than-batch-size branch March 6, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix bug with array size mismatch when db row count was less than batch size

2 participants