Fix Sysbench MySQL TPCC restart-on-crash failure; bump sysbench package to rev6#738
Open
AlexWFMS wants to merge 1 commit into
Open
Fix Sysbench MySQL TPCC restart-on-crash failure; bump sysbench package to rev6#738AlexWFMS wants to merge 1 commit into
AlexWFMS wants to merge 1 commit into
Conversation
QoS MySQL Sysbench TPCC goals fail 100% on VirtualClient restart-on-crash. The shipped sysbench package's cleanup-database.py has no TPCC branch (Cleanup is a no-op) and populate-database.py's 'prepare' is not idempotent. When a crash leaves the TPCC tables populated, every restart re-runs 'prepare' against non-empty tables -> MySQL error 1062 (Duplicate entry itemN.PRIMARY) / 1061 -> 6 crashes -> System.AggregateException -> experiment runs to full timeout. - populate-database.py: drop existing TPCC tables before 'prepare' so populate is idempotent regardless of prior (crash-interrupted) state. This also re-syncs the repo copy with the deployed package lineage (the repo had drifted to a stale rev3-era version using --host + a truncate loop; the shipped rev5 uses --hostIpAddress + a run_command FATAL-detector and no truncate loop). - cleanup-database.py: add the missing MySQL TPCC branch so Cleanup drops tables. - Bump all 4 SYSBENCH profiles (MYSQL/POSTGRESQL x OLTP/TPCC) rev5 -> rev6. NOTE: the fixed scripts ship inside sysbench-1.0.20.rev6.zip in the 'packages' blob store (not the build), so that package must be uploaded for this to take effect. Reproduced and verified on an Ubuntu 24.04 VM with VC-equivalent sysbench 1.1.0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
This is probably adding some confusion. The scripts in source are not being used in the workload. Make sure to make changes to the scripts in the packages in blob store. I think we also edit the version in-place here instead of bumping the package version (keep it at rev5). |
ericavella
requested changes
Jun 30, 2026
ericavella
left a comment
Contributor
There was a problem hiding this comment.
Looks like we don't need changes in source yet for this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The QoS MySQL Sysbench TPCC target goals fail ~100% on VirtualClient
restart-on-crash (observed across all VC versions in PPE01). An experiment
reaches the benchmark once, then any restart-on-crash dies in the
database-population step and the experiment runs to its full timeout.
Root cause
The shipped
sysbenchpackage has two cooperating defects on the MySQL TPCC path:cleanup-database.pyhas no TPCC branch — only MySQLOLTPis handled, sothe
Cleanupaction is a no-op for TPCC and never drops the tables.populate-database.py'sprepareis not idempotent — it runssysbench tpcc … prepareagainst whatever is already in the DB.When a crash leaves the TPCC tables populated, every restart re-runs
prepareagainst non-empty tables →
sysbenchemitsFATAL: … returned error 1062 (Duplicate entry '1' for key 'itemN.PRIMARY')(or
1061on indexes) → therun_commandFATAL-detector fails the step → VCrestart-on-crash retries 6× →
System.AggregateException(MonitorAgentWorkload)→ the experiment runs to the full timeout.
Fix
populate-database.py: drop any existing TPCC tables (sysbench tpcc … cleanup)before
prepare, so populate is idempotent regardless of prior (possiblycrash-interrupted) state.
cleanup-database.py: add the missing MySQL TPCC branch so theCleanupaction actually drops the tables.
These scripts ship inside the
sysbench-1.0.20.revN.zippackage in thepackagesblob store (not the build), so the package was re-revved:
sysbench-1.0.20.rev6.zip=rev5contents + the two fixed scripts,and uploaded to the
packagesstore.PERF-{MYSQL,POSTGRESQL}-SYSBENCH-{OLTP,TPCC}profilesrev5→rev6.Verification
Reproduced and verified on an Ubuntu 24.04 VM with a VC-equivalent
sysbench 1.1.0build (
akopytov/sysbench+ Perconatpcc.lua, exactly asconfigure-workload-generator.pybuilds it):prepareagainst populated tables →FATAL … db_bulk_insert_next() failed(1062). Matches production.populate-database.pyrecovers on a dirty DB (rc=0, no 1062,idempotent across repeated runs); patched
cleanup-database.pydrops the TPCCtables (
item1→ no table).Files changed
src/VirtualClient/VirtualClient.Actions/Sysbench/populate-database.pysrc/VirtualClient/VirtualClient.Actions/Sysbench/cleanup-database.pysrc/VirtualClient/VirtualClient.Main/profiles/PERF-MYSQL-SYSBENCH-OLTP.jsonsrc/VirtualClient/VirtualClient.Main/profiles/PERF-MYSQL-SYSBENCH-TPCC.jsonsrc/VirtualClient/VirtualClient.Main/profiles/PERF-POSTGRESQL-SYSBENCH-OLTP.jsonsrc/VirtualClient/VirtualClient.Main/profiles/PERF-POSTGRESQL-SYSBENCH-TPCC.jsonVERSION(3.3.14 → 3.3.15)