Skip to content

Add database cleanup step before populating MySQL Sysbench databases#735

Merged
ericavella merged 1 commit into
mainfrom
users/evellanoweth/mysql-sysbench-cleanup
Jun 25, 2026
Merged

Add database cleanup step before populating MySQL Sysbench databases#735
ericavella merged 1 commit into
mainfrom
users/evellanoweth/mysql-sysbench-cleanup

Conversation

@ericavella

@ericavella ericavella commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a database cleanup step immediately before the PopulateMySQLDatabase dependency in both MySQL Sysbench profiles:

  • PERF-MYSQL-SYSBENCH-OLTP.json
  • PERF-MYSQL-SYSBENCH-TPCC.json

The new step uses the existing SysbenchConfiguration Cleanup action, which runs cleanup-database.py to drop tables left over from a previous run (guarded by SysbenchState.DatabasePopulated) before a new database is populated.

Motivation

We are seeing MySQL server crashes & reconnects during these workloads. Independent of root-causing the load, populating on top of a stale/partially-populated database across repeated executions is a risk. Running cleanup first guarantees a clean slate before each populate.

Testing

  • JSON validated for both profiles.
  • dotnet test VirtualClient.Actions.FunctionalTests --filter Sysbench → 10 passed, 6 ignored, 0 failed.

Adds a SysbenchConfiguration Cleanup action immediately before the PopulateMySQLDatabase step in the PERF-MYSQL-SYSBENCH-OLTP and PERF-MYSQL-SYSBENCH-TPCC profiles. This drops any tables left over from a previous run before a new database is populated, preventing stale-state issues across repeated executions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@AlexWFMS AlexWFMS left a comment

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.

nice

@ericavella ericavella merged commit 887464a into main Jun 25, 2026
5 checks passed
@ericavella ericavella deleted the users/evellanoweth/mysql-sysbench-cleanup branch June 25, 2026 16:55
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.

2 participants