Add database cleanup step before populating MySQL Sysbench databases#735
Merged
Merged
Conversation
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>
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.
Summary
Adds a database cleanup step immediately before the
PopulateMySQLDatabasedependency in both MySQL Sysbench profiles:PERF-MYSQL-SYSBENCH-OLTP.jsonPERF-MYSQL-SYSBENCH-TPCC.jsonThe new step uses the existing
SysbenchConfigurationCleanupaction, which runscleanup-database.pyto drop tables left over from a previous run (guarded bySysbenchState.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
dotnet test VirtualClient.Actions.FunctionalTests --filter Sysbench→ 10 passed, 6 ignored, 0 failed.