Commit a9fb406
Fix Sysbench TPCC PopulateDatabase passing --warehouses 0 on small VMs (#675)
On VMs with 4 vCPUs or fewer, GetWarehouseCount returns 1, causing the
Populate mode calculation (warehouseEstimate - 1) to yield 0. This passes
--warehouses 0 to populate-database.py, which calls sysbench tpcc prepare
with --scale=0, dropping and recreating all tables with zero data. The
client then fails with nil value errors on every run attempt.
Fix: Use Math.Max(1, warehouseEstimate - 1) to ensure at least 1 warehouse
is always passed to the populate step.
Co-authored-by: Alex Williams-Ferreira <alexwill@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 3ffe2e9 commit a9fb406
2 files changed
Lines changed: 2 additions & 2 deletions
File tree
- src/VirtualClient
- VirtualClient.Actions.UnitTests/Sysbench
- VirtualClient.Actions/Sysbench
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
| 430 | + | |
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| |||
0 commit comments